Description Usage Arguments Value
Replaces elements in character vector 'string' with elements found in 'replacement', if the element matches one of the patterns in 'pattern'. Matches of pattern[i] are replaced with replacement[i].
Intended usage is to convert a vector of path strings into a vector of class labels.
1 | mystr_detect_replace(string, pattern, replacement = pattern)
|
string |
Input vector. Either a character vector, or something coercible to one. |
pattern |
Vector of patterns to look for. See stringr::str_which() for details. |
replacement |
Vector of replacement strings. Has to be of the same length as pattern. |
A character vector.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.