vgrepl {IssueTrackeR} | R Documentation |
Vectorize grepl
Description
Vectorize grepl
Usage
vgrepl(
pattern,
x,
ignore.case = TRUE,
perl = FALSE,
fixed = FALSE,
useBytes = FALSE
)
Arguments
pattern |
character string containing a regular expression (or
character string for fixed = TRUE) to be matched in the given character
vector. Coerced by as.character to a character string if possible. Missing
values are allowed except for |
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 |
perl |
logical. Should Perl-compatible regexps be used? |
fixed |
logical. If |
useBytes |
logical. If |
Details
This function works the same way as grepl
but with a
vectorize pattern. This means that if the argument pattern
has a
length >= 2 then the output will be calculated iteratively by pattern. So
instead of having a vector as output, we get a matrix with
length(pattern)
rows and length(pattern)
columns.
For more informations, see the function grepl
.
Value
a matrix with as many rows as length(x)
and as many columns
as length(pattern)
containing TRUE or FALSE. Each column is the result
of call to grepl
.