powered by
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.
changeCategoryID(variable, from, to)
the variable in a crunch dataset that will be changed (note: the variable must be categorical, categorical array, or multiple response)
the (old) id identifying the category you want to change
the (new) id for the category
variable with category from and all associated data values mapped to id to
variable
from
to
# NOT RUN { ds$country <- changeCategoryID(ds$country, 2, 6) # }
Run the code above in your browser using DataLab