x <- c(a=1, b=2)
rename(x,a="A",b="B")
# Since version 0.99.22 - the following also works:
rename(x,a=A,b=B)
str(rename(iris,
Sepal.Length="Sepal_Length",
Sepal.Width ="Sepal_Width",
Petal.Length="Petal_Length",
Petal.Width ="Petal_Width"
))
str(rename(iris,
.="_"
,gsub=TRUE))
# Since version 0.99.22 - the following also works:
str(rename(iris,
Sepal.Length=Sepal_Length,
Sepal.Width =Sepal_Width,
Petal.Length=Petal_Length,
Petal.Width =Petal_Width
))
Run the code above in your browser using DataLab