replace_ {rbioacc} | R Documentation |
Replace element of a vector
replace_(x, from, to)
x |
a vector |
from |
a vector of elements to replace |
to |
a vector with replacing elements |
a vector
replace_(1:10,c(2,4,5,8), c(0,0,0,0))
replace_(c(1,2,2,3,2),c(3,2), c(4,5))