filter_element {textclean} | R Documentation |
Remove Elements in a Vetor
Description
Removes the matching elements of a vector.
Usage
filter_element(x, pattern, ...)
Arguments
x |
A character vector. |
pattern |
A regex pattern to match for exclusion. |
... |
Other arguments passed to |
Value
Returns a vector with matching elements removed.
Examples
x <- c('dog', 'cat', 'bat', 'dingo', 'dragon', 'dino')
filter_element(x, '^d.+?g')
filter_element(x, 'at$')
filter_element(x, '^d')
filter_element(x, '\\b(dog|cat)\\b')
[Package textclean version 0.9.3 Index]