build_meta.Rd
creates a dataset that describes the characteristics of another dataset
build_meta(data, expand_binary_catgs = FALSE, add_perc_to_cats = TRUE, max_catgs = 10)
data | a data frame with any combination of the following
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 |
max_catgs | largest number of categories accepted in a factor
variable. A warning message is printed if a factor variable
has more categories than |
A list containing components of data
, group_levels
,
and var_levels
. The data
component comprises 8 columns:
variable: variable name - this is the column name of the variable.
label: variable labels - this is presented in tables
type: type of variable (numeric or factor)
unit: units for continuous variables
group: a group identifier for each variable
abbr: abbreviations associated with the label of a variable
note: strings that will be place in tables as a footnote
labels: labels of variables, including categories of factors.
data
is also a tibble.
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.