powered by
recode(x, from, to, warn = TRUE)## S3 method for class 'default': recode(x, from, to, warn = TRUE)
## S3 method for class 'default': recode(x, from, to, warn = TRUE)
x
x <- LETTERS[1:5] recode(x, c("B", "D"), c("Beta", "Delta")) # On numeric vectors x <- c(1, 4, 5, 9) recode(x, from = c(1, 4, 5, 9), to = c(10, 40, 50, 90))
Run the code above in your browser using DataLab