Description Usage Arguments Value pattern argument Author(s) Examples
for inline reporting in an R markdown document.
1 2 3 4 5 6 7 8 9 10 |
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
1 2 3 4 5 6 7 8 9 | 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
)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.