swap | R Documentation |
Exchange Existing set of Values for another set of Values
swap(x, uniques, newUniques)
x |
Vector to apply the exchange over |
uniques |
(Sorted) vector of unique OLD values |
newUniques |
(Sorted) vector of unique NEW values |
Swapped vector of x
my.vect = c(1,2,2,2,4,4,4,3,3,3,3)
swap(my.vect,c(1,2,3,4),c(11,22,33,44))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.