Learn R Programming

conquestr (version 1.4.5)

recodeResps: recodeResps

Description

Recode raw item responses for analyses.

Usage

recodeResps(data, recodeMap, varLabel, rawLabel, recodeLabel)

Value

a data frame with raw data recoded according to recodeMap.

Arguments

data

Raw data, a data frame.

recodeMap

A data frame which contains the raw responses and corresponding recoded responses for each of the items in long form.

varLabel

A variable name in recodeMap that identifes the item label.

rawLabel

A variable name in recodeMap that identifies the raw item responses to be recoded.

recodeLabel

A variable name in recodeMap that idenitfies the new values to recode to.