cosm_sum: Cosmetics for summary tables Adds some cosmetics to tables of...

Description Usage Arguments Details Value Examples

View source: R/misc_functions.R

Description

Cosmetics for summary tables Adds some cosmetics to tables of descriptive statistics generated by tbl_summary.

Usage

1
cosm_sum(gt_tbl, pad = 3, bold = FALSE, head_label = "**Variable**")

Arguments

gt_tbl

A table object generated by tbl_summary.

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.

Details

Function cosm_sum adds some cosmetics to tables generated by tbl_summary, then converts the table as a huxtable and sets proper alignment.

Value

A huxtable.

Examples

1
2
3
4
5
6
7
8
require(dplyr, quietly = TRUE)

data(Oncho)
Oncho %>%
  select(-id) %>%
  tbl_summary() %>%
  cosm_sum(bold = TRUE) %>%
  theme_pubh(1)

pubh documentation built on Oct. 11, 2021, 9:10 a.m.