Obtain the answer options for a target variable as a set of name-value pairs in labelled numeric vector.
Arguments
- json_path
Character. Full path to the Survey Solutions questionnaire JSON file (e.g.,
~/my_proj/path/to/document.json).- categories_dir
Character. Path to the
Categoriesdirectory of metadata and/or where the.xlsxfiles containing reusable categories can be found.- varname
Variable name. Bare name of variable whose answer options to extract.
- to_exclude
Numeric vector. Code of answer options to exclude.