Last chance! 50% off unlimited learning
Sale ends in
deprecated 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 = NULL,
...
)
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
# NOT RUN {
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
)
# }
Run the code above in your browser using DataLab