I want to rename some random columns of a large data frame and I want to use the current column names, not the indexes. Column indexes might change if I add
plyr has a rename function for just this purpose:
plyr
library(plyr) mydf <- rename(mydf, c("MyName.1" = "MyNewName"))