Skip to contents

A gtsummary theme for Roche tables

  • Calls the gtsummary::theme_gtsummary_compact theme.

  • Uses gtsummary::label_style_pvalue(digits = 2) as the default formatting function for all p-values.

  • Defaults to a mono-spaced font for gt tables.

Usage

theme_gtsummary_roche(set_theme = TRUE, font_size = NULL)

Arguments

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

font_size

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

Value

theme list

Examples

theme_gtsummary_roche()
#> Setting theme "Roche"

tbl_demographics(trial, by = trt, include = c(age, grade))
#> Setting theme "Roche"
Characteristic Drug A
N = 98
Drug B
N = 102
Age

    n 91 98
    Mean (SD) 47 (15) 47 (14)
    Median (Q1, Q3) 46 (37, 60) 48 (39, 56)
    Min, Max 6, 78 9, 83
Grade, n (%)

    n 98 102
    I 35 (35.7%) 33 (32.4%)
    II 32 (32.7%) 36 (35.3%)
    III 31 (31.6%) 33 (32.4%)
reset_gtsummary_theme()