lifecycle::badge("maturing")
Extracts and returns statistics from a tbl_survfit
object for
inline reporting in an R markdown document. Detailed examples in the
inline_text vignette
# S3 method for tbl_survfit
inline_text(
x,
variable = NULL,
level = NULL,
pattern = NULL,
time = NULL,
prob = NULL,
column = NULL,
estimate_fun = x$inputs$estimate_fun,
pvalue_fun = NULL,
...
)
A string reporting results from a gtsummary table
Object created from tbl_survfit
Variable name of statistic to present.
Level of the variable to display for categorical variables.
Can also specify the 'Unknown' row. Default is NULL
String indicating the statistics to return.
time for which to return survival probabilities.
probability with values in (0,1)
column to print from x$table_body
.
Columns may be selected with time=
or prob=
as well.
Function to round and format estimate and confidence limits.
Default is the same function used in tbl_survfit()
Function to round and format p-values.
Default is style_pvalue.
The function must have a numeric vector input (the numeric, exact p-value),
and return a string that is the rounded/formatted p-value (e.g.
pvalue_fun = function(x) style_pvalue(x, digits = 2)
or equivalently,
purrr::partial(style_pvalue, digits = 2)
).
Not used
Daniel D. Sjoberg
Other tbl_summary tools:
add_ci()
,
add_n.tbl_summary()
,
add_overall()
,
add_p.tbl_summary()
,
add_q()
,
add_stat_label()
,
bold_italicize_labels_levels
,
inline_text.tbl_summary()
,
modify
,
separate_p_footnotes()
,
tbl_custom_summary()
,
tbl_merge()
,
tbl_split()
,
tbl_stack()
,
tbl_strata()
,
tbl_summary()