Learn R Programming

crunch (version 1.14.4)

dichotomize: Indicate how categories represent a dichotomized value

Description

Multiple Response variables are essentially Categorical Arrays that have had a category or categories indicated as the "selected" value. These methods let you set that state.

Usage

"is.dichotomized"(x)
"dichotomize"(x, i)
"dichotomize"(x, i)
"dichotomize"(x, i)
"undichotomize"(x)
"dichotomize"(x, i)
"dichotomize"(x, i)
"undichotomize"(x)
"undichotomize"(x)

Arguments

x
Categories or a Variable subclass that has Categories
i
For the dichotomize methods, the numeric or logical indices of the categories to mark as "selected", or if character, the Category "names". Note that unlike some other categorical variable methods, numeric indices are positional, not with reference to category ids.

Value

Categories or the Variable, (un)dichotomized accoringly

Details

dichotomize lets you specify which categories are "selected", while undichotomize strips that selection information. Dichotomize converts a Categorical Array to a Multiple Response, and undichotomize converts back.

See Also

describe-category