changeCategoryID: Change the id of a category for a categorical variable
Description
Changes the id of a category from an existing value to a new one.
The variable can be a categorical, categorical array, or multiple response
variable. The category changed will have the same numeric value and missing
status as before. The one exception to this is if the numeric value is the
same as the id, then the new numeric value will be the same as the new id.
Usage
changeCategoryID(variable, from, to)
Arguments
variable
the variable in a crunch dataset that will be changed (note: the variable must be categorical, categorical array, or multiple response)
from
the (old) id identifying the category you want to change
to
the (new) id for the category
Value
variable with category from and all associated data values mapped to id to