Description Usage Arguments Value Examples
This function behaves similarly to betterGrepl, except that it accepts a vector of pattern
s
1 | VbetterGrepl(pattern, x, ignore.case = T, fixed = T)
|
pattern |
character vector containing regular expressions (or character strings for fixed = TRUE) to be matched in the
given character vector |
x |
a character vector where matches are sought, or an object which can be coerced by as.character to a character vector. Long vectors are supported. |
ignore.case |
logical. if FALSE, the pattern matching is case sensitive and if TRUE, case is ignored during matching. |
fixed |
logical. If TRUE, |
Logical matrix with one row for each element of x
and one column for each element of pattern
. The
entries indicate whether a math was found between the relevant pattern and character string.
1 2 3 4 5 6 | x = c("Alpha", "Beta", "Bet", NA_character_, "B")
patterns = c("a", NA, "b", "c", "e")
VbetterGrepl(pattern = patterns, x = x)
VbetterGrepl(pattern = patterns, x = x, ignore.case = F)
VbetterGrepl(pattern = patterns, x = x, fixed = F)
VbetterGrepl(pattern = patterns, x = x, ignore.case = F, fixed = F)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.