Skip to contents

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.

Usage

rm_special_chars_v2(str_vec)

Arguments

str_vec

A vector of strings to be processed

Value

A 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"