View source: R/HandyUtilities.R
Renames column names in a dataframe, so each column name matching columnsBy[[i]] becomes columnsTo[[i]]
1 | RenameColumns(df, columnsBy, columnsTo, fill = NA)
|
df |
A data frame with which to rename the colnames |
columnsBy |
A vector of colnames to be replaced |
columnsTo |
A vector of names to replace with |
fill |
Values to insert into the now missing columns |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.