Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

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

Details

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

Value

Invisibly returns the value of the object.

Author(s)

Gregory R. Warnes greg@warnes.net

See Also

Examples

a <- 1:10
  a
  mv("a", "b")
  b
  exists("a")

gdata

Various R Programming Tools for Data Manipulation

v2.18.0
GPL-2
Authors
Gregory R. Warnes, Ben Bolker, Gregor Gorjanc, Gabor Grothendieck, Ales Korosec, Thomas Lumley, Don MacQueen, Arni Magnusson, Jim Rogers, and others
Initial release
2017-06-05

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.