powered by
character
factor
recode(x, from, to, to.class = NULL)
test <- letters[sample(5, 10, replace=TRUE)] recode(test, from=letters[1:5], to=paste('Letter', letters[1:5]))
Run the code above in your browser using DataLab