I\'m a fan of the revalue function is plyr for substituting strings. It\'s simple and easy to remember.
revalue
plyr
However, I\'ve migrated new code to
One alternative that I find handy is the mapvalues function for the data.tables e.g
df[, variable := mapvalues(variable, old = old_names_string_vector, new = new_names_string_vector)]