Skip to contents

Create a table of basic demographic characteristics

Usage

table_one(ds, stratify_by_sex = FALSE, geography = NULL)

Arguments

ds

A PicnicHealth data set list object.

stratify_by_sex

A boolean indicator of whether to stratify characteristics by sex or not. The default is FALSE. If set to TRUE, the table will stratify columns by sex.

geography

Indicator of what geography to count patients by. Can be "region" for US Census Regions or "division" for US Census Divisions. There are 4 census regions and 9 census divisions. If NULL, the default, no geographic distribution is given in the table.

Value

A tbl_summary object from the gtsummary package describing some basic demographic distributions for the data set.

Details

Requires that the following tables are available in the PicnicHealth data set list object, ds:

  • person

  • clinical_document

  • visit

Age is computed as age at enrollment.

See also

Examples

if (FALSE) { # \dontrun{
ds <- load_data_set("/path/to/data")
table_one(ds)
} # }