Rename Columns in a Data Frame Based on Restriction Names
rename_model_columns.Rd
This function takes a data frame and a character vector of restrictions. It renames any columns in the data frame matching the restrictions using the simplified names produced by rename_model_code
.
Examples
df <- data.frame(GRGL = 1:3, GRFRPR = 4:6)
rename_model_columns(df, c("GRGL", "GRFRPR"))
#> GRL EER
#> 1 1 4
#> 2 2 5
#> 3 3 6