T_hss_merge_datasets: Merge HSS survey rounds into one dataframe

View source: R/T_hss_merge_datasets.R

T_hss_merge_datasetsR Documentation

Merge HSS survey rounds into one dataframe

Description

Merges multiple survey rounds from the same location into a single dataframe. The function expects stata .dta files and requires a mapping file containing the changes of variable names throughout survey rounds. The resulting dataframe contains only variables present in all datasets. Output is stripped of its haven labels (if any).

Usage

T_hss_merge_datasets(folder, mapping)

Arguments

folder

a folder containing the .dta files to be merged. The function does not check whether files belong to the same survey location.

mapping

a mapping dataframe containing the variable names for the different survey rounds and their relation to each other.

Value

Returns a dataframe consisting of all columns present in each of the provided datasets.


RenRMT/hsstools documentation built on April 14, 2025, 7:10 p.m.