R/bold_italicize_group_labels.R
bold_italicize_group_labels.Rd
Set bold and/or italic style for groups labels in stacked tables
bold_italicize_group_labels(
x,
bold = FALSE,
italics = FALSE,
print_engine = c("gt", "flextable", "huxtable")
)
a gtsummary stacked table
logical indicating whether to bold the group header rows
logical indicating whether to italicize the group header rows
Choose a print engine to render the table, must be one of
c("gt", "flextable", "huxtable")
A table of class selected in print_engine. Of note, the output will no longer be a gtsummary table.
Example 1
Other gtsummary-related functions:
add_inline_forest_plot()
,
add_sparkline()
,
as_ggplot()
,
logistic_reg_adj_diff()
,
style_tbl_compact()
,
tbl_likert()
,
theme_gtsummary_msk()
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)
#> ℹ Column headers among stacked tables differ. Headers from the first table are
#> used. Use `quiet = TRUE` to supress this message.
#> ℹ gtsummary table has been converted class "gt"