Is there a shorter version for the folowing principle to rename certain columns of a data frame?
data1<-data.frame(\"a\"=1:3,\"b\"=1:3,\"c\"=1:3) data1Names&
You can use rename from the plyr package:
rename
data1<-data.frame("a"=1:3,"b"=1:3,"c"=1:3) > rename(data1,c('a' = 'hello','b' = 'world')) hello world c 1 1 1 1 2 2 2 2 3 3 3 3