Expands EMS codes by adding EMS_ to start if absent and replacing all '-' with '_'. This function is provided because wqbc stored EMS codes in expanded form.

expand_ems_codes(x)

Arguments

x

A character vector of codes to expand

Examples

expand_ems_codes(c("0014", "KR-P", "0_15", "EMS_ZN_T"))
#> [1] "EMS_0014" "EMS_KR_P" "EMS_0_15" "EMS_ZN_T"