powered by
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**")
A huxtable.
huxtable
A table object generated by tbl_summary.
tbl_summary
Numerical, padding above and bellow rows.
Display labels in bold?
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.
cosm_sum
require(dplyr, quietly = TRUE) data(Oncho) Oncho |> select(-id) |> tbl_summary() |> cosm_sum(bold = TRUE) |> theme_pubh(1)
Run the code above in your browser using DataLab