This function takes a dataframe and a list of matching columns, along with a mapping file,
and renames the columns in the dataframe based on the mapping file.
Usage
rename_columns(df, matching_cols, dfTableau_naming)
Arguments
- df
A dataframe.
- matching_cols
A character vector of column names in df that match with the mapping file.
- dfTableau_naming
A dataframe containing the mapping between old and new column names.
Value
The dataframe with renamed columns.
Examples
if (FALSE) { # \dontrun{
df <- rename_columns(df, matching_cols, dfTableau_naming)
} # }