You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When plotting a cuminc() plot and adding a risk table, the order of the strata in the risk table is alphabetical. Is it possible for the order to follow the levels of a factor?
In the example below, I would like Drug B to be the top row in the risk table, and Drug A to come second.
It seems by default the risk table does not follow the levels of the factored stratum.
@saskia-c A temporary fix is to adjust the levels in plotobject$data$strata.
E.g. plot$data$strata <- forcats::fct_rev(plot$data$strata)
The order of the factor levels there seem to decide the order in the risk table
When plotting a cuminc() plot and adding a risk table, the order of the strata in the risk table is alphabetical. Is it possible for the order to follow the levels of a factor?
In the example below, I would like Drug B to be the top row in the risk table, and Drug A to come second.
It seems by default the risk table does not follow the levels of the factored stratum.
Not sure if this a bug or a missing feature, but any help on this would be greatly appreciated. Many thanks!
The text was updated successfully, but these errors were encountered: