E.g. MRI_GPI_L0 / MRI_GPI_L36 -> MRI_GPI_L_V0 / MRI_GPI_L_V3.
The longest suffixes are tried first ("36" before "6" or "0").
Usage
visit_map_suffix(cols, select, suffix_map = c(`36` = "V3", `0` = "V0"))Value
Named character vector c(OLD = "NEW") for rename_with_map().
Examples
visit_map_suffix(c("MRI_GPI_L0", "MRI_GPI_L36", "AGE"), select = "^MRI_")
#> MRI_GPI_L0 MRI_GPI_L36
#> "MRI_GPI_L_V0" "MRI_GPI_L_V3"
