Renaming variables in a dataframe

· Data manipulation, GNU-R
Authors

There is no direct command in R for renaming variables and that may make it less than obvious for some people. Of course, once you know, it is simple. The following command does the trick.

names(dataframe)[names(dataframe)==”oldvariablename”]<-“newvariablename”

 

VR

 

Technorati:

%d bloggers like this: