Skip to content

Instantly share code, notes, and snippets.

@jdesilvio
Last active December 21, 2015 15:44
Show Gist options
  • Save jdesilvio/bd867a9a283f5cce1b18 to your computer and use it in GitHub Desktop.
Save jdesilvio/bd867a9a283f5cce1b18 to your computer and use it in GitHub Desktop.
Rename column
# Rename a column
renameCol = function(df, oldName, newName) {
names(df)[names(df) == oldName] = newName
df
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment