Description Usage Arguments Value Author(s) Examples
Function is a wrapper for gsub()
which allows to replace more than one pattern.
1 | gsubAll ( string, old, new)
|
string |
a character vector where matches are sought |
old |
character vector containing strings to be matched in the given character vector named |
new |
a replacement for matched pattern |
character vector with replaced patterns
Benjamin Becker
1 2 3 | ### 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"))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.