powered by
str_detect(string, pattern)
regex
string
pattern
grepl
fruit <- c("apple", "banana", "pear", "pinapple") str_detect(fruit, "a") str_detect(fruit, "^a") str_detect(fruit, "a$") str_detect(fruit, "b") str_detect(fruit, "[aeiou]")
Run the code above in your browser using DataLab