Skip to contents

This function recodes response options in HESPER items to a standardized set of allowed values (see hesper_opts for the allowed response options).

Usage

rec_hesper_opts(df, hesper_vars, old_hesper_opts)

Arguments

df

(data.frame[,1+]) A data frame containing HESPER items.

hesper_vars

(character[1+]) Names of HESPER item column names to recode.

old_hesper_opts

(character_named[5]) Response options mapped to allowed response options for HESPER items. Names are allowed options and values are the old options to recode from.

Value

(data.frame[,1+]) A data frame with HESPER items recoded to the allowed response options.