apply multiple substitutions on a vector of character. For each element in replacements gsub is called with the element name being the pattern and the element value being the replacement.

multiSubstitute(strings, replacements, ..., dbg = FALSE)

Arguments

strings

vector of character

replacements

list of pattern = replacement pairs.

...

additional arguments passed to gsub

dbg

if TRUE (the default is FALSE) it is shown which strings were replaced