Description Usage Arguments Value See Also Examples
Merge a list of surveys into a list with harmonized variable names, variable labels and survey identifiers.
1 | merge_waves(waves, var_harmonization)
|
waves |
A list of surveys |
var_harmonization |
Metadata of surveys, including at least
|
A list of surveys with harmonized names and variable labels.
survey
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | examples_dir <- system.file("examples", package = "retroharmonize")
survey_list <- dir(examples_dir)[grepl("\\.rds", dir(examples_dir))]
example_surveys <- read_surveys(
file.path( examples_dir, survey_list),
save_to_rds = FALSE)
metadata <- metadata_waves_create(example_surveys)
to_harmonize <- metadata %>%
dplyr::filter ( var_name_orig %in%
c("rowid", "w1") |
grepl("trust ", label_orig ) ) %>%
dplyr::mutate ( var_label = var_label_normalize(label_orig) ) %>%
dplyr::mutate ( var_name = val_label_normalize(var_label) )
merge_waves ( example_surveys, to_harmonize )
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.