rename_col | R Documentation |
A helper function that renames columns in a data frame based on a specified mapping.
Used internally in get_var_structure()
, get_data_by_dims()
, and rename_dims()
.
rename_col(df, rename_cols)
df |
A data frame containing columns to be renamed. |
rename_cols |
A named vector where names are existing column names, and values are the corresponding new names. |
Replaces column names according to the provided rename_cols
mapping.
Ensures no duplicate column names by appending numerical suffixes when necessary.
Helps standardize column names across SL4 and HAR datasets.
A modified data frame with renamed columns.
Pattawee Puangchit
get_var_structure
, get_data_by_dims
, rename_dims
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.