Skip to contents

Similar to subset_surveys, but will not only remove the variables that cannot be harmonized, but renames the remaining variables.

Usage

harmonize_survey_variables(
  crosswalk_table,
  subset_name = "subset",
  survey_list = NULL,
  survey_paths = NULL,
  import_path = NULL,
  export_path = NULL
)

Arguments

crosswalk_table

A crosswalk table created by crosswalk_table_create or a manually created crosstable including at least filename, var_name_orig, var_name_target and optionally var_label_orig and var_label_target. This parameter is optional and defaults to NULL.

subset_name

An identifier for the survey subset.

survey_list

A list of surveys imported with read_surveys. If set to NULL, the survey_path should give full path to the surveys.

survey_paths

A vector of full file paths to the surveys to subset.

Value

A list of surveys or save individual rds files on the export_path.