mgsub {bayesbio} | R Documentation |
An extension to gsub that handles vectors of patterns and replacements, avoiding recursion problems associated with overlap at the extense of computation time.
mgsub(pattern, replacement, x, ...)
pattern |
Character vector of patterns to match. |
replacement |
Character vector of replacements for each pattern. |
x |
Character vector in which the gsub should be performed. |
... |
Additional arguments to grep. |
http://stackoverflow.com/a/15254254/560791