powered by
for inline reporting in an R markdown document.
# S3 method for tbl_survival inline_text(x, strata = NULL, time = NULL, prob = NULL, pattern = "{estimate} ({conf.level*100}% CI {ci})", estimate_fun = x$estimate_fun, ...)
A string reporting results from a gtsummary table
The following items are available to print. Use print(x$table_long) to print the table the estimates are extracted from.
print(x$table_long)
{label} 'time' or 'prob' label
{label}
{estimate} survival or survival time estimate formatted with 'estimate_fun'
{estimate}
{conf.low} lower limit of confidence interval formatted with 'estimate_fun'
{conf.low}
{conf.high} upper limit of confidence interval formatted with 'estimate_fun'
{conf.high}
{ci} confidence interval formatted with x$estimate_fun (pre-formatted)
{ci}
{time}/{prob} time or survival quantile (numeric)
{time}/{prob}
{n.risk} number at risk at 'time' (within stratum if applicable)
{n.risk}
{n.event} number of observed events at 'time' (within stratum if applicable)
{n.event}
{n} number of observations (within stratum if applicable)
{n}
{variable} stratum variable (if applicable)
{variable}
{level} stratum level (if applicable )
{level}
{groupname} label_level from original tbl_survival() call
{groupname}
tbl_survival()
Other tbl_survival tools: modify_header, tbl_survival.survfit
modify_header
tbl_survival.survfit
# NOT RUN { library(survival) surv_table <- survfit(Surv(ttdeath, death) ~ trt, trial) %>% tbl_survival(times = c(12, 24)) inline_text(surv_table, strata = "Drug", time = 12 ) # }
Run the code above in your browser using DataLab