mv: Rename an Object

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/mv.R

Description

Rename an object.

Usage

1
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

rm, assign

Examples

1
2
3
4
5
  a <- 1:10
  a
  mv("a", "b")
  b
  exists("a")

Example output

sh: 1: cannot create /dev/null: Permission denied
gdata: Unable to locate valid perl interpreter
gdata: 
gdata: read.xls() will be unable to read Excel XLS and XLSX files
gdata: unless the 'perl=' argument is used to specify the location of a
gdata: valid perl intrpreter.
gdata: 
gdata: (To avoid display of this message in the future, please ensure
gdata: perl is installed and available on the executable search path.)
sh: 1: cannot create /dev/null: Permission denied
gdata: Unable to load perl libaries needed by read.xls()
gdata: to support 'XLX' (Excel 97-2004) files.

gdata: Unable to load perl libaries needed by read.xls()
gdata: to support 'XLSX' (Excel 2007+) files.

gdata: Run the function 'installXLSXsupport()'
gdata: to automatically download and install the perl
gdata: libaries needed to support Excel XLS and XLSX formats.

Attaching package: 'gdata'

The following object is masked from 'package:stats':

    nobs

The following object is masked from 'package:utils':

    object.size

The following object is masked from 'package:base':

    startsWith

 [1]  1  2  3  4  5  6  7  8  9 10
 [1]  1  2  3  4  5  6  7  8  9 10
[1] FALSE

gdata documentation built on May 2, 2019, 5:49 p.m.