Skip to contents

Subgroup Analyses

Usage

tbl_subgroups(data, subgroups, .tbl_fun, ...)

Arguments

data

data frame

subgroups

character vector of column names to perform stratified analyses among

.tbl_fun

A function or formula. If a function, it is used as is. If a formula, e.g. ~ .x %>% tbl_summary() %>% add_p(), it is converted to a function. The stratified data frame is passed to this function.

...

Additional arguments passed on to the .tbl_fun function.

Value

a gt table

Examples

# add example