Skip to contents

Parses a specified .R "harmony file" produced by the Survey Harmonization Tool harmony to produce associated microdata with all available harmonized variables. This function is called within prepare and likely never needs to be called for the user directly.

Usage

harmonize(
  harmony.file,
  respondent,
  output = "both",
  ncores = getOption("fusionData.cores")
)

Arguments

harmony.file

Character. Name of a .R harmony file located at /harmony/harmonies.

respondent

Character. Should the output microdata be at the "household" or "person" level?

output

Character. Can be "both", "donor", or "recipient", indicating which microdata to return.

ncores

Integer. Number of physical CPU cores used for parallel computation.

Value

When output = "both", a list of length 2 containing the donor and recipient data frames. Otherwise, a single data frame.

Examples

test <- harmonize(harmony.file = "CEI_2015-2019__ACS_2015.R", respondent = "household")