Description Usage Arguments Value Examples
rename.columns takes a data frame d containing the old column names and returns a new dataframe with the replaced names.
1 2 | ## S3 method for class 'columns'
rename(data, old.column.names, new.column.names)
|
data |
dataframe with new column names |
old.column.names |
old column names |
new.column.names |
new column names |
dataframe with replaced column names
1 2 | (d<-rename.columns(d<-data.frame(x=c(1:10),y=rnorm(10),z=c(10:1)),c("y","x"),c("x","y")))
(d<-rename.columns(d,c("y","x"),c("x","y")))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.