[Experimental] The tbl_split function splits a single gtsummary table into multiple tables. Updates to the print method are expected.

tbl_split(x, ...)

# S3 method for gtsummary
tbl_split(x, variables, ...)

# S3 method for tbl_split
print(x, ...)

Arguments

x

gtsummary table

...

not used

variables

variables at which to split the gtsummary table rows (tables will be separated after each of these variables)

Value

tbl_split object

Examples

tbl <-
  tbl_summary(trial) %>%
  tbl_split(variables = c(marker, grade))