util_ensure_label {dataquieR} | R Documentation |
Utility function ensuring valid labels and variable names
Description
Valid labels should not be empty, be unique and do not exceed a certain length. This also applies to the VAR_NAMES. When adjusting the VAR_NAMES, we have to ensure that we do not introduce additional matches or mismatches between the column names of the study data and the VAR_NAMES column in the metadata.
Usage
util_ensure_label(
study_data,
meta_data,
label_col,
max_label_len = MAX_LABEL_LEN
)
Arguments
study_data |
data.frame the data frame that contains the measurements |
meta_data |
data.frame the data frame that contains metadata attributes of study data |
label_col |
variable attribute the name of the column in the metadata with labels of variables |
max_label_len |
integer maximum length for the labels, defaults to 30. |
Value
a list containing the study data, possibly with adapted column names, the metadata, possibly with adapted labels, and a string and a table informing about the changes
[Package dataquieR version 2.1.0 Index]