Array variables are composed of a set of "subvariables" bound together for display in the app. For example, you might have a set of survey questions that ask how the respondent would rate a tv show from 1-5. Array variables allow you to display all of their ratings in a compact table rather than a set of distinct variables.
makeArray(subvariables, name, ...)makeMR(subvariables, name, selections, ...)
deriveArray(subvariables, name, selections, ...)
a list of Variable objects to bind together, or a Dataset subset which contains only the Variables to bind.
character, the name that the new Categorical Array variable should have.
Optional additional attributes to set on the new variable.
character, for makeMR
and deriveArray
the names of the
categories to mark as the dichotomous selections. Required for
makeMR
; optional for deriveArray
; ignored in makeArray
.
A VariableDefinition that when added to a Dataset will create the
categorical-array or multiple-response variable. deriveArray
will
make a derived array expression (or a derived multiple response expression
if selections
are supplied), while makeArray
and makeMR
return an expression that "binds" variables together, removing them from
independent existence.