str_any_match {textTools} | R Documentation |
Detect if there are any words in a vector also found in another vector.
str_any_match(x, y)
x |
A vector of words. |
y |
A vector of words to test against. |
TRUE/FALSE, TRUE if any words in x are also in y
str_any_match(
x = c("a", "dog", "went", "to", "the", "store"),
y = c("the")
)
str_any_match(
x = c("a", "dog", "went", "to", "the", "store"),
y = c("apple")
)