bold_italicize_group_labels: Set bold and/or italic style for groups labels in stacked...

View source: R/bold_italicize_group_labels.R

bold_italicize_group_labelsR Documentation

Set bold and/or italic style for groups labels in stacked tables

Description

Set bold and/or italic style for groups labels in stacked tables

Usage

bold_italicize_group_labels(
  x,
  bold = FALSE,
  italics = FALSE,
  print_engine = c("gt", "flextable", "huxtable")
)

Arguments

x

a gtsummary stacked table

bold

logical indicating whether to bold the group header rows

italics

logical indicating whether to italicize the group header rows

print_engine

Choose a print engine to render the table, must be one of c("gt", "flextable", "huxtable")

Value

A table of class selected in print_engine. Of note, the output will no longer be a gtsummary table.

Example Output

Example 1

bold_italicize_group_labels_ex1.png

See Also

Other gtsummary-related functions: add_inline_forest_plot(), add_sparkline(), as_ggplot(), logistic_reg_adj_diff(), style_tbl_compact(), tbl_likert(), theme_gtsummary_msk()

Examples

library(gtsummary)

bold_italicize_group_labels_ex1 <-
  trial %>%
  select(age, trt, grade) %>%
  tbl_strata(
    strata = grade,
    ~ .x %>%
      tbl_summary(by = trt, missing = "no"),
    .combine_with = "tbl_stack"
  ) %>%
  bold_italicize_group_labels(bold = TRUE)


ddsjoberg/bstfun documentation built on July 4, 2023, 10:59 a.m.