# Example usage with a sample gtsummary table
library(gtsummary)
base_table <- trial %>%
tbl_summary(by = "trt", missing = "no")
customize_table(
base_table,
var_group = "trt",
add_total = TRUE,
show_missing_data = TRUE,
show_n_per_group = FALSE,
group_title = "Treatment Group",
table_title = "Summary Statistics",
var_title = "Variables",
var_tot = "Total"
)
Run the code above in your browser using DataLab