Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

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,
  ...
)

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()

Value

a Multiple response variable definition


crunch

Crunch.io Data Tools

v1.28.0
LGPL (>= 3)
Authors
Greg Freedman Ellis [aut, cre], Jonathan Keane [aut], Mike Malecki [aut], Neal Richardson [aut], Gordon Shotwell [aut]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.