# NOT RUN {
tbl_summary_ex1 <-
trial %>%
dplyr::select(age, grade, response) %>%
tbl_summary()
tbl_summary_ex2 <-
trial %>%
dplyr::select(age, grade, response, trt) %>%
tbl_summary(
by = trt,
label = list(vars(age) ~ "Patient Age"),
statistic = list(all_continuous() ~ "{mean} ({sd})"),
digits = list(vars(age) ~ c(0, 1))
)
# }
Run the code above in your browser using DataLab