Description Usage Arguments Details Value Author(s) See Also
Recode unique values of one variable to match unique values of another variable.
1 | recodeAs(A, B)
|
A |
The character vector/factor to recode. |
B |
The character vector/factor whose unique values are to be copied. |
This function is a wrapper around recodeVar. It can be used when you need to
recode a character variable/factor so that the values correspond with those of another variable
(e.g. when merging datasets with slightly different value labels).
The matchstrings function is used to guess the best mapping between the values of 'A' and the values of 'B'.
Use this function with care.
The recoded version of 'A'
Ben Veal
recode for recoding numbers (in library(car)), recodeVar, recodeMatch,
colwise2 for recoding multiple dataframe columns simultaneously (in library(plyr)).
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.