Learn R Programming

gdata (version 2.18.0)

mv: Rename an Object

Description

Rename an object.

Usage

mv(from, to, envir = parent.frame())

Arguments

from

Character scalar giving the source object name

to

Character scalar giving the desination object name

envir

Environment in which to do the rename

Value

Invisibly returns the value of the object.

Details

This function renames an object by the value of object a to the name b, and removing a.

See Also

rm, assign

Examples

Run this code
# NOT RUN {
  a <- 1:10
  a
  mv("a", "b")
  b
  exists("a")
# }

Run the code above in your browser using DataLab