
Remove special characters and spaces from a string vector and capitalize the result
Source:R/clean_hces.R
rm_special_chars_v2.Rd
This function takes a vector of strings as input, removes all special characters and spaces from each string, and returns a new vector of strings where each string is collapsed into one string and capitalized.
Examples
rm_special_chars_v2(c("PACKET (LARGE)", "BAG (SMALL)", "BOX (MEDIUM)"))
#> PACKETLARGE BAGSMALL BOXMEDIUM
#> "PACKETLARGE" "BAGSMALL" "BOXMEDIUM"