get_km {easysurv} | R Documentation |
Calculates Kaplan-Meier estimates for survival data and returns summary statistics, plots, and additional outputs.
get_km(
data,
time,
event,
group = NULL,
group_labels = NULL,
just_km = FALSE,
...
)
data |
A data frame containing the survival data. |
time |
The name of the column in |
event |
The name of the column in |
group |
(Optional) The name of the column in |
group_labels |
Optional character vector containing the names of
the strata (default is NULL). Provide in a consistent order with
|
just_km |
Logical. If |
... |
(Optional) Parameters to pass to ggsurvfit. |
A list containing Kaplan-Meier estimates, summary statistics, and plots.
km_results <- get_km(
data = easysurv::easy_bc,
time = "recyrs",
event = "censrec",
group = "group",
risktable_symbols = FALSE
)
km_results