tbl_split: Split gtsummary table

View source: R/tbl_split.R

tbl_splitR Documentation

Split gtsummary table

Description

\lifecycle

experimental
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)

Value

tbl_split object

Examples

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

gtsummary documentation built on Sept. 11, 2024, 5:50 p.m.