Replace specified values with new values, in a factor or character vector.
Source:R/revalue.r
revalue.RdIf x is a factor, the named levels of the factor will be
replaced with the new values.
Details
This function works only on character vectors and factors, but the
related mapvalues function works on vectors of any type and factors,
and instead of a named vector specifying the original and replacement values,
it takes two separate vectors
See also
mapvalues to replace values with vectors of any type