Generate data dictionary from survey microdata
createDictionary.Rd
Produces a data dictionary with standard structure that can be saved alongside processed microdata. Resulting dictionary can be compiled with other survey dictionaries via compileDictionary. This function is typically called at the end of a .R script that generates processed survey microdata.
Arguments
- data
Data frame. Survey microdata with variable descriptions stored in columns via
var_label
.- survey
Character. Unique survey identifier (e.g. "RECS").
- vintage
Character. Survey vintage (e.g. 2015).
- respondent
Character. Respondent type; either "Household" or "Person" or a string identifiable as such.