Pattern matching and replacement
gsubAll.rd
Function is a wrapper for gsub()
which allows to replace more than one pattern.
Examples
### replace all numbers by words
txt <- "1 example for 2 reasons in 4 seasons"
gsubAll ( txt, old = as.character(1:4), new = c("one", "two", "three", "four"))
#> [1] "one example for two reasons in four seasons"