Description Usage Arguments Value Examples
Report statistics from fmt_table1
inline in an Rmarkdown document
1 2 3 | ## S3 method for class '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
1 2 3 4 5 6 7 8 9 | t1 <- fmt_table1(mtcars)
t2 <- fmt_table1(mtcars, by = "am")
t3 <- fmt_table1(mtcars, by = "am") %>% add_overall()
inline_text(t1, "mpg") # mpg
inline_text(t1, "cyl:4") # cyl=4
inline_text(t2, "mpg:1") # mpg with am=1
inline_text(t2, "cyl:4:1") # cyl=4 with am=1
inline_text(t3, "mpg", overall = TRUE) # overall mpg summary
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.