define_surv_km | R Documentation |
Define a survival distribution based on a table of Kaplan-Meier output containing times and survival probabilities.
define_surv_km(x, time_col = "time", surv_col = "survival")
define_surv_table(x, time_col = "time", surv_col = "survival")
x |
a data frame with columns for time and survival probability. By
default, these columns are assumed to be named |
time_col |
the name of the time column (defaults to |
surv_col |
the name of the time column (defaults to |
a surv_km
object.
df <- data.frame(
time = c(0, 1, 5, 10),
survival = c(1, 0.9, 0.7, 0.5)
)
define_surv_km(df)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.