words <- c("apple", "banana", "cherry") # grepl returns TRUE where the pattern is found print(grepl("an", words))
test for a pattern