View source: R/collect_val_labels.R
| collect_val_labels | R Documentation |
Extract unique valid or user-defined missing value labels from survey metadata.
collect_val_labels(metadata)
collect_na_labels(metadata)
metadata |
A metadata data frame created by [metadata_create()]. |
'collect_val_labels()' collects labels from the 'valid_labels' column of the metadata.
'collect_na_labels()' collects labels from the 'na_labels' column of the metadata.
Duplicate labels are removed, preserving their first occurrence.
A character vector of unique value labels. If no labels are found, an empty character vector is returned.
Other harmonization functions:
create_codebook(),
crosswalk_surveys(),
harmonize_na_values(),
harmonize_survey_values(),
harmonize_values(),
harmonize_var_names(),
is.crosswalk_table(),
label_normalize()
test_survey <- read_rds(
file = system.file(
"examples",
"ZA7576.rds",
package = "retroharmonize"
),
id = "test"
)
example_metadata <- metadata_create(survey_list = test_survey)
collect_val_labels(metadata = example_metadata)
collect_na_labels(metadata = example_metadata)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.