create_descriptive_table: create_descriptive_table

Description Usage Arguments Value Examples

View source: R/figi_functions.R

Description

Convenience wrapper function around table1 package. Function is limited but works for simple cases like distribution of covariates by outcome. Code includes workaround for adding p values that the package author described in vignette.

Usage

1
create_descriptive_table(dat, outcome, exposure, covariates, covarCat)

Arguments

outcome

Outcome variable

exposure

Exposure variable

covarCat

String vector of categorical variables (factors)

df

Input data

covarAll

String vector of covariates to include in table

Value

table1 table (use in Rmarkdown)

Examples

1
create_descriptive_table(gxe, outcome, aspirin, c('sex', 'age'), c('sex'))

KimAE/figifs documentation built on March 10, 2021, 9:31 p.m.