Skip to contents

This function takes a data frame and recodes specified variables based on the dictionary.

Usage

recode_dic_items(df, prefix_label = "(recoded)")

Arguments

df

a data frame that contains variables to be recoded

prefix_label

Prefix is added to the item label of a recoded item

Value

A recoded data frame

Details

This function is useful, when you want to recode the 'raw' values from a vector in a data.frame based on recoding information provided in a dictionary file. For example, you code the answers in a data frame that were given to a task. And you have additional information in a dic-file that tells you, which answer is correct (1) vs. false (0).