Learn R Programming

crunch (version 1.2.1)

makeArray: Make a Categorical Array or Multiple Response variable

Description

Make a Categorical Array or Multiple Response variable

Usage

makeArray(list_of_variables, dataset = NULL, pattern = NULL,
  key = namekey(dataset), name, ...)

makeMR(list_of_variables, dataset = NULL, pattern = NULL, key = namekey(dataset), name, selections, ...)

Arguments

list_of_variables
a list of Variable objects to bind together, or a Dataset object containing only the Variables to bind (as in from subsetting a Dataset), or values (e.g. names) of variables corresponding to key. If omitted, must supply dataset a
dataset
the Crunch Dataset to which the variables in list_of_variables belong, or in which to search for variables based on pattern. If omitted, list_of_variables must exist and all Variables in the list must belong to the s
pattern
An optional regular expression to search for variables to bind within dataset.
key
character, the name of the Variable field in which to search with pattern. Default is 'alias'.
name
character, the name that the new Categorical Array variable should have. Required.
...
Optional additional attributes to set on the new variable.
selections
character, for makeMR, the names of the categories to mark as the dichotomous selections. Required for makeMR; ignored in makeArray.

Value

  • The object of class CategoricalArrayVariable or MultipleResponseVariable corresponding to the just-created variable on the server.