Is there a grep function in R that returns TRUE if a pattern is found anywhere in the given character vector and FALSE otherwise?
All the functions I see return a vector of the current positions of each element found.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Are you looking for “any”?
Note that you can do this for strings as well
And it can be convenient when combined with applies: