swap | R Documentation |
Swap values simultaneously. Present since hutils 1.4.0
.
x %<->% value
x, value |
Objects whose values are to be reassigned by swapping. |
NULL
invisibly. Called for its side-effect: the values
of x
and value
are swapped. So
x %<->% value
is equivalent to
temp <- x x <- value value <- temp rm(temp)
a <- 1 b <- 2 a %<->% b a b
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.