varRename: Rename Variable in Dataframe

Description Usage Arguments Value Author(s) Examples

View source: R/varRename.R

Description

Renames a variable in specified dataframe.

Usage

1
varRename(Data, From, To)

Arguments

Data

a dataframe object

From

vector of original name(s) of variable(s) as strings

To

vector of new name(s) of variable(s) as strings

Value

Returns dataframe with new variable names for specified variable(s)

Author(s)

John J. Curtin jjcurtin@wisc.edu

Examples

1
2
3
4
  d = data.frame(x=1:10, y=11:20)
  names(d)
  d = varRename(d, c('x', 'y'), c('x1', 'y1'))
  names(d)

lmSupport documentation built on May 29, 2017, 11:06 a.m.