rename {reshape}R Documentation

Rename

Description

Rename an object

Usage

rename(x, replace)

Arguments

x object to be renamed
replace named vector specifying new names

Details

The rename function provide an easy way to rename the columns of a data.frame or the items in a list.

Author(s)

Hadley Wickham <h.wickham@gmail.com>

Examples

rename(mtcars, c(wt = "weight", cyl = "cylinders"))
a <- list(a = 1, b = 2, c = 3)
rename(a, c(b = "a", c = "b", a="c"))

[Package reshape version 0.8.2 Index]