Description Usage Arguments Details Value
Renames one or several columns in a data.frame
1 | rename_cols(dat, oldnames, newnames)
|
dat |
a data.frame containing the columns to be renamed. |
oldnames |
a character vector of column names to be be renamed. |
newnames |
a character vector of new names for the columns to be renamed. |
This function can be used in lieu of other functions in well know packages such as dplyr, plyr, and data.table. The squeleton of the function was found at: http://stackoverflow.com/questions/21502465/replacement-for-rename-in-dplyr.
the same data.frame with columns with new names.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.