View source: R/calc_surv_p_table.R
calc_surv_p_table | R Documentation |
Takes a survfit
object and returns a tibble with proportion surviving at
given times and confidence intervals.
calc_surv_p_table(
fit,
times = c(0, 12, 24, 36, 48),
all_group_name = "All subjects"
)
fit |
|
times |
A numeric vector |
all_group_name |
String name for all records. Default is "All subjects". |
A tibble
library(survival)
library(dplyr)
head(aml)
fit <- survival::survfit(
survival::Surv(time = time,
event = status) ~ x,
data = aml)
calc_surv_p_table(fit)
calc_surv_p_table(fit, times = c(6, 18, 30))
fit <- survival::survfit(
survival::Surv(time = time,
event = status) ~ 1,
data = aml)
calc_surv_p_table(fit)
calc_surv_p_table(fit, times = c(6, 18, 30))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.