Skip to content

Instantly share code, notes, and snippets.

@mhkeller
Created April 24, 2012 15:49
Show Gist options
  • Save mhkeller/2480904 to your computer and use it in GitHub Desktop.
Save mhkeller/2480904 to your computer and use it in GitHub Desktop.
Rename columns headers in a dataframe in R
names(df) <- c("column1","column2")
or by name
names(df)[names( df)=="Los_Angeles"]<-"LA"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment