View source: R/get_risktable.R
get_risktable | R Documentation |
Create a risk table from an object using an S3 method. Currently, no default method is defined.
get_risktable(x, ...)
## S3 method for class 'survfit'
get_risktable(
x,
times = NULL,
statlist = "n.risk",
label = NULL,
group = c("strata", "statlist"),
collapse = FALSE,
...
)
## S3 method for class 'tidycuminc'
get_risktable(
x,
times = pretty(x$tidy$time, 10),
statlist = "n.risk",
label = NULL,
group = c("strata", "statlist"),
collapse = FALSE,
...
)
x |
an object of class |
... |
other arguments passed on to the method |
times |
Numeric vector indicating the times at which the risk set, censored subjects, events are calculated. |
statlist |
Character vector indicating which summary data to present. Current choices are "n.risk" "n.event" "n.censor", "cum.event", "cum.censor". Default is "n.risk". |
label |
Character vector with labels for the statlist. Default matches "n.risk" with "At risk", "n.event" with "Events", "n.censor" with "Censored", "cum.event" with "Cum. Event", and "cum.censor" with "Cum. Censor". |
group |
String indicating the grouping variable for the risk tables. Current options are:
Default is "strata". |
collapse |
Boolean, indicates whether to present the data overall. Default is FALSE. |
return list of attributes the form the risk table i.e. number of patients at risk per strata
summary.survfit
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.