Description Usage Arguments Examples
Detect the presence or absence of a pattern in a string.
1 | rr4r_detect(x, pattern)
|
x |
A character vector to look for the patterns in. |
pattern |
A pattern to look for. |
1 2 3 4 5 6 7 8 | ### These examples are taken from stringr's doc (?str_detect) ###
fruit <- c("apple", "banana", "pear", "pinapple")
rr4r_detect(fruit, "a")
rr4r_detect(fruit, "^a")
rr4r_detect(fruit, "a$")
rr4r_detect(fruit, "b")
rr4r_detect(fruit, "[aeiou]")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.