View source: R/bcat_sum_table.R
| bcat_sum_table | R Documentation |
Produce a descriptive statistics table with UC styling. Displays mean, SD, min, median, max, N, and percent missing for numeric columns.
bcat_sum_table(
df,
by = NULL,
stats = c("mean", "sd", "min", "median", "max", "n", "pct_missing"),
digits = 2,
caption = NULL,
footer = NULL,
font_size = 12,
header_bg_color = palette_UC[["UC Red"]],
header_txt_color = palette_UC[["White"]],
striped = TRUE,
doc_type = NULL,
...
)
df |
A data frame, tibble, or data.table. |
by |
Character. Column name for grouped summaries. Default is NULL. |
stats |
Character vector of statistics to compute. Default includes all. |
digits |
Integer. Number of decimal places. Default is 2. |
caption |
Character. Table caption. |
footer |
Character. Table footnote. |
font_size |
Numeric. Font size. Default is 12. |
header_bg_color |
Background color for header. Default is UC Red. |
header_txt_color |
Text color for header. Default is white. |
striped |
Logical. Zebra striping? Default is TRUE. |
doc_type |
Character. Force output format. Auto-detected if NULL. |
... |
Additional arguments passed to table formatting. |
A formatted table object.
Saannidhya Rawat
Other tables:
bcat_cor_table(),
bcat_fmt_style_table(),
bcat_reg_table()
bcat_sum_table(mtcars[, c("mpg", "wt", "hp")])
bcat_sum_table(mtcars[, c("mpg", "wt", "cyl")], by = "cyl")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.