The tbl_split
function splits a single gtsummary table into multiple tables.
Updates to the print method are expected.
Usage
tbl_split(x, ...)
# S3 method for class 'gtsummary'
tbl_split(x, variables, ...)
# S3 method for class 'tbl_split'
print(x, ...)
Arguments
- x
(
gtsummary
)
gtsummary table- ...
These dots are for future extensions and must be empty.
- variables
(
tidy-select
)
variables at which to split the gtsummary table rows (tables will be separated after each of these variables)
Examples
tbl <-
tbl_summary(trial) |>
tbl_split(variables = c(marker, grade))