powered by
Recode the value of a vector or matrix.
vector
matrix
recode(x, from, to)
a vector or matrix
original value of x
x
new value of x
recoded x
# NOT RUN { x=rep(1:5,each=2) recode(x,from=1:5,to=5:1) recode(x,from=1:5,to=11:15) # }
Run the code above in your browser using DataLab