move | R Documentation |
Rename object from
into to
.
move(from, to)
mv(from, to)
from |
an R object name |
to |
the new R object name |
none.
J.R. Lobry
citation("seqinr")
swap
#
# Example in a new empty environment:
#
local({
zefplock <- pi
print(ls())
print(zefplock)
mv(zefplock, toto)
print(ls())
print(toto)
stopifnot(identical(toto, pi)) # Sanity check
})
#
# Check that self-affectation is possible:
#
mv(mv, mv) # force self-affectation for the function itself
mv(mv, mv) # OK, function mv() still exists
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.