build_meta: Meta data builder

Description Usage Arguments Value

View source: R/build_meta.R

Description

creates a dataset that describes the characteristics of another dataset

Usage

1
2
build_meta(data, expand_binary_catgs = FALSE, add_perc_to_cats = TRUE,
  max_catgs = 10)

Arguments

data

a data frame with any combination of the following attributes: label, unit, group, abbrs, and notes. Columns in the meta data are based on these attributes.

expand_binary_catgs

T/F, should all categories be included for binary categorical variables? (This only applies to binary variables.)

add_perc_to_cats

T/F, should categorical variables in Table 1 have a the user specifies include_freq = TRUE in tibble_one, then the when include_freq = FALSE, setting this to TRUE should clarify the table.

max_catgs

largest number of categories accepted in a factor variable. A warning message is printed if a factor variable has more categories than max_catg.

Value

A list containing components of data, group_levels, and var_levels. The data component comprises 8 columns:

The group_levels component shows the order that groups will appear in the table, and var_levels shows the order that variables will appear in the table and within groups.


bcjaeger/KableOne documentation built on Oct. 16, 2019, 12:26 p.m.