inline_text.tbl_cross {gtsummary} | R Documentation |
Report statistics from cross table inline
Description
Extracts and returns statistics from a tbl_cross
object for
inline reporting in an R markdown document. Detailed examples in the
inline_text vignette
Usage
## S3 method for class 'tbl_cross'
inline_text(
x,
col_level,
row_level = NULL,
pvalue_fun = label_style_pvalue(prepend_p = TRUE),
...
)
Arguments
x |
( |
col_level |
( |
row_level |
( |
pvalue_fun |
( |
... |
These dots are for future extensions and must be empty. |
Value
A string reporting results from a gtsummary table
Examples
tbl_cross <-
tbl_cross(trial, row = trt, col = response) %>%
add_p()
inline_text(tbl_cross, row_level = "Drug A", col_level = "1")
inline_text(tbl_cross, row_level = "Total", col_level = "1")
inline_text(tbl_cross, col_level = "p.value")
[Package gtsummary version 2.0.0 Index]