fmt_table1
inline in an Rmarkdown documentinline_text.fmt_table1.Rd
Report statistics from fmt_table1
inline in an Rmarkdown document
# S3 method for fmt_table1 inline_text(x, cell, sep = ":", pvalue = FALSE, p_pvalue = FALSE, overall = FALSE, ...)
x | object of class |
---|---|
cell | identifier for which cell to return from the |
sep | a character string to separate the terms (e.g. variable name, ) |
pvalue | logical indicator to return p-value. Default is |
p_pvalue | logical indicator to return p-value with prepended p
(e.g. p=0.3 and p<0.001). Default is |
overall | logical indicator to return overall summary
statistic. Default is |
... | further arguments passed from generic |
Formatted descriptive statistics from a fmt_table1
object
t1 <- fmt_table1(mtcars) t2 <- fmt_table1(mtcars, by = "am") t3 <- fmt_table1(mtcars, by = "am") %>% add_overall() inline_text(t1, "mpg") # mpg#> [1] "19.2 (15.4, 22.8)"#> [1] "11 (34%)"#> [1] "22.8 (21.0, 30.4)"#> [1] "8 (62%)"#> [1] "19.2 (15.4, 22.8)"