# \donttest{
# Basic usage - clean missing values in summary table
gtsummary::trial |>
gtsummary::tbl_summary(by = trt) |>
clean_table()
# Often used as part of a styling pipeline
# Create a test dictionary for add_auto_labels():
dictionary <- tibble::tribble(
~Variable, ~Description,
'age', 'Age at enrollment',
'stage', 'T Stage',
'grade', 'Grade',
'response', 'Tumor Response'
)
gtsummary::trial |>
gtsummary::tbl_summary(by = trt) |>
add_auto_labels() |>
extras() |>
clean_table()
# Works with regression tables too
lm(age ~ trt + grade, data = gtsummary::trial) |>
gtsummary::tbl_regression() |>
clean_table()
# }
Run the code above in your browser using DataLab