theme_gtsummary_roche: Roche Theme

View source: R/theme_gtsummary_roche.R

theme_gtsummary_rocheR Documentation

Roche Theme

Description

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.

  • If flextable-printed, header text is always bold.

  • 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().

Usage

theme_gtsummary_roche(
  font_size = NULL,
  print_engine = c("flextable", "gt", "kable", "kable_extra", "huxtable", "tibble"),
  set_theme = TRUE
)

Arguments

font_size

(scalar numeric)
Numeric font size for compact theme. Default is 13 for gt tables, and 8 for all other output types

print_engine

String indicating the print method. Must be one of "gt", "kable", "kable_extra", "flextable", "tibble"

set_theme

(scalar logical)
Logical indicating whether to set the theme. Default is TRUE. When FALSE the named list of theme elements is returned invisibly

Value

theme list

Examples

theme_gtsummary_roche()

tbl_roche_summary(
  trial,
  by = trt,
  include = c(age, grade),
  nonmissing = "always"
)

reset_gtsummary_theme()

crane documentation built on Aug. 30, 2025, 1:12 a.m.