if (FALSE) { # rlang::is_installed("gtsummary")
# \donttest{
library(gtsummary)
tbl <-
trial |>
tbl_summary(
include = c(stage, grade, age, trt, response, death)
) |>
add_variable_group_header(
header = "Clinical situation at diagnosis",
variables = c(stage, grade, age)
) |>
add_variable_group_header(
header = "Treatment and outcome",
variables = c(trt, response, death)
)
tbl
tbl |>
bold_variable_group_headers() |>
italicize_labels() |>
indent_levels(indent = 8L)
# }
}
Run the code above in your browser using DataLab