Report statistics from survival summary tables inline
## S3 method for class 'tbl_survival'
inline_text(
x,
strata = NULL,
time = NULL,
prob = NULL,
pattern = "{estimate} ({conf.level*100}% CI {ci})",
estimate_fun = NULL,
...
)x |
Object created from tbl_survival |
strata |
If |
time |
Time for which to return survival probability |
prob |
Probability for which to return survival time. For median
survival use |
pattern |
String indicating the statistics to return. Uses
glue::glue formatting.
Default is |
estimate_fun |
function to round/style estimate and lower/upper confidence interval estimates. Note, this does not style the 'ci' column, which is a string. Default is x$estimate_fun |
... |
Not used |
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.
{label} 'time' or 'prob' label
{estimate} survival or survival time estimate formatted with 'estimate_fun'
{conf.low} lower limit of confidence interval formatted with 'estimate_fun'
{conf.high} upper limit of confidence interval formatted with 'estimate_fun'
{ci} confidence interval formatted with x$estimate_fun (pre-formatted)
{time}/{prob} time or survival quantile (numeric)
{n.risk} number at risk at 'time' (within stratum if applicable)
{n.event} number of observed events at 'time' (within stratum if applicable)
{n} number of observations (within stratum if applicable)
{variable} stratum variable (if applicable)
{level} stratum level (if applicable )
{groupname} label_level from original tbl_survival() call
Karissa Whiting
library(survival) surv_table <- survfit(Surv(ttdeath, death) ~ trt, trial) %>% tbl_survival(times = c(12, 24)) inline_text(surv_table, strata = "Drug A", time = 12 )
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.