Learn R Programming

crunch (version 1.30.4)

makeMRFromText: Create Multiple Response Variable from Delimited lists

Description

Surveys often record multiple response questions in delimited lists where each respondent's selections are separated by a delimiter like ; or |. This function breaks the delimited responses into subvariables, uploads those subvariables to Crunch, and finally creates a multiple response variable from them.

Usage

makeMRFromText(
  var,
  delim,
  name,
  selected = "selected",
  not_selected = "not_selected",
  unanswered = NA,
  ...
)

Value

a Multiple response variable definition

Arguments

var

The variable containing the delimited responses

delim

The delimiter separating the responses

name

The name of the resulting MR variable

selected

A character string used to indicate a selection, defaults to "selected"

not_selected

Character string identifying non-selection, defaults to "not_selected"

unanswered

Character string indicating non-response, defaults to NA.

...

Other arguments to be passed on to makeMR()