Last active
December 21, 2015 15:44
-
-
Save jdesilvio/bd867a9a283f5cce1b18 to your computer and use it in GitHub Desktop.
Rename column
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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