# \donttest{
# Apply theme at the start of your analysis
use_jama_theme()
# All subsequent gtsummary tables will use JAMA formatting
gtsummary::trial |>
gtsummary::tbl_summary(by = trt)
# Works with all gtsummary table types
lm(age ~ trt + grade, data = gtsummary::trial) |>
gtsummary::tbl_regression()
# Combine with sumExtras styling functions
use_jama_theme()
gtsummary::trial |>
gtsummary::tbl_summary(by = trt, include = c(age, marker, stage)) |>
extras() |>
add_group_styling()
# Reset to default theme if needed
gtsummary::reset_gtsummary_theme()
# }
Run the code above in your browser using DataLab