
Detect if there are any words in a vector also found in another vector.
str_any_match(x, y)
A vector of words.
A vector of words to test against.
TRUE/FALSE, TRUE if any words in x are also in y
# NOT RUN {
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")
)
# }
Run the code above in your browser using DataLab