tidy_survfit | R Documentation |
The broom package exports a tidier for "survfit"
objects.
This function adds on top of that and returns more information.
The function also utilizes additional information stored when the
survfit object is created with survfit2()
.
It's recommended to always use this function with survfit2()
.
tidy_survfit(x, times = NULL, type = c("survival", "risk", "cumhaz"))
x |
a 'survfit' object created with | |||||||||
times |
numeric vector of times. Default is | |||||||||
type |
type of statistic to report.
Available for Kaplan-Meier estimates only.
Default is
|
a tibble
survfit2(Surv(time, status) ~ factor(ph.ecog), data = df_lung) %>%
tidy_survfit()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.