| rename {memisc} | R Documentation |
rename changes the names of a named object.
rename(x, ...)
x |
Any named object |
... |
A sequence of named arguments, all of type character |
This function changes the names of x according to the
remaining arguments. The argument names are the old
names, the values are the new names.
The object x with new names defined by the ... arguments.
x <- c(a=1, b=2)
rename(x,a="A",b="B")
str(rename(iris,
Sepal.Length="SepalLength",
Sepal.Width ="SepalWidth",
Petal.Length="PetalLenght",
Petal.Width ="PetalWidth"
))