recodeResps function

recodeResps

recodeResps

Recode raw item responses for analyses.

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

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.

Returns

a data frame with raw data recoded according to recodeMap.

  • Maintainer: Dan Cloney
  • License: GPL-3
  • Last published: 2025-02-19