msub | R Documentation |
This function was deprecated as it is replaced by psub
msub(x, pattern, replacement, regex = FALSE, ...)
x |
A character vector. |
pattern |
A character vector of patterns to replace. |
replacement |
A character vector of the same length as pattern with the corresponding replacements. |
regex |
A logical to denote whether |
... |
Other arguments to gsub |
A character vector of the same length as x
msub(letters[1:10], c("a", "c", "e"), c("A", "C", "E"))
msub(c("a", "b", "ac", "ad"), c("a", "ac"), c("A", "AC"))
## Not run:
# "ac" is replaced with "Ac" due to substring matching
msub(c("a", "b", "ac", "ad"), c("a", "ac"), c("A", "AC"), regex = TRUE)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.