Rename Restriction Codes to Simplified Names
rename_model_code.Rd
This function takes a character vector of model codes and simplifies them by combining adjacent 'R' and 'L' suffixes for the same base letter (G, F, or P) into a single 'RL'. It also applies established names for specific restrictions.
Value
A named character vector where the original restrictions are the names and the simplified names are the values.
Examples
rename_model_code(c("GRGL", "GRFRPR", "GRGLFRFLPRPL"))
#> GRGL GRFRPR GRGLFRFLPRPL
#> "GRL" "EER" "GDR"