A gtsummary theme for Roche tables
flextable- and gt-printed tables are styled with reduced padding and font size.
Uses label_roche_pvalue() as the default formatting function for all p-values.
Uses label_roche_percent() as the default formatting function for all percent values.
Font size defaults are 8 points for all the table by the footers that are 7 points.
Border defaults to flextable::fp_border_default(width = 0.5).
The add_overall(col_label) default value has been updated.
The results from gtsummary::tbl_hierarchical() and gtsummary::tbl_hierarchical_count()
are now post-processed with gtsummary::remove_footnote_header(),
crane::modify_zero_recode(), and crane::modify_header_rm_md().
theme_gtsummary_roche(
font_size = NULL,
print_engine = c("flextable", "gt", "kable", "kable_extra", "huxtable", "tibble"),
set_theme = TRUE
)(scalar numeric)
Numeric font size for compact theme.
Default is 13 for gt tables, and 8 for all other output types
String indicating the print method. Must be one of
"gt", "kable", "kable_extra", "flextable", "tibble"
(scalar logical)
Logical indicating whether to set the theme. Default is TRUE.
When FALSE the named list of theme elements is returned invisibly
theme list
theme_gtsummary_roche()
#> Setting theme "Roche"
tbl_roche_summary(
trial,
by = trt,
include = c(age, grade),
nonmissing = "always"
)
Drug A
(N = 98)
Drug B
(N = 102)
reset_gtsummary_theme()