View source: R/misc_functions.R
| cosm_sum | R Documentation |
Cosmetics for summary tables Adds some cosmetics to tables of descriptive statistics generated by tbl_summary.
cosm_sum(gt_tbl, pad = 3, bold = FALSE, head_label = "**Variable**")
gt_tbl |
A table object generated by |
pad |
Numerical, padding above and bellow rows. |
bold |
Display labels in bold? |
head_label |
Character, label to be used as head for the variable's column. |
Function cosm_sum adds some cosmetics to tables generated by tbl_summary, then converts the table as a huxtable and sets proper alignment.
A huxtable.
require(dplyr, quietly = TRUE)
data(Oncho)
Oncho |>
select(-id) |>
tbl_summary() |>
cosm_sum(bold = TRUE) |>
theme_pubh(1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.