| str_detect_approx | R Documentation |
Perform approximate string detection while using familiar stringr syntax.
str_detect_approx() is a wrapper around base R agrepl().
str_which_approx() is a wrapper around base R agrep().
str_subset_approx() is a wrapper around
string[str_detect_approx(string, pattern)].
str_detect_approx(string, pattern, ...) str_which_approx(string, pattern, ...) str_subset_approx(string, pattern, ...)
string |
Input vector. Either a character vector, or something coearcible to one. |
pattern |
Pattern to look for. |
... |
see the documentation for |
For str_detect_approx(), a logical vector. For
str_which_approx() and str_subset_approx(), a character
vector
agrep()
friends <- c("Jon", "Ron", "Jack", "Mac", "jan")
str_detect_approx(friends, "Jon")
str_detect_approx(friends, "Jon", ignore.case = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.