View source: R/set_gtsummary_theme.R
set_gtsummary_theme | R Documentation |
Functions to set, reset, get, and evaluate with gtsummary themes.
set_gtsummary_theme()
set a theme
reset_gtsummary_theme()
reset themes
get_gtsummary_theme()
get a named list with all active theme elements
with_gtsummary_theme()
evaluate an expression with a theme temporarily set
check_gtsummary_theme()
checks if passed theme is valid
set_gtsummary_theme(x, quiet)
reset_gtsummary_theme()
get_gtsummary_theme()
with_gtsummary_theme(
x,
expr,
env = rlang::caller_env(),
msg_ignored_elements = NULL
)
check_gtsummary_theme(x)
x |
(named |
quiet |
|
expr |
( |
env |
( |
msg_ignored_elements |
( |
The default formatting and styling throughout the gtsummary package are taken from the published reporting guidelines of the top four urology journals: European Urology, The Journal of Urology, Urology and the British Journal of Urology International. Use this function to change the default reporting style to match another journal, or your own personal style.
Available gtsummary themes
# Setting JAMA theme for gtsummary
set_gtsummary_theme(theme_gtsummary_journal("jama"))
# Themes can be combined by including more than one
set_gtsummary_theme(theme_gtsummary_compact())
set_gtsummary_theme_ex1 <-
trial |>
tbl_summary(by = trt, include = c(age, grade, trt)) |>
add_stat_label() |>
as_gt()
# reset gtsummary theme
reset_gtsummary_theme()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.