matches {ore} | R Documentation |
Extract matching substrings
Description
These functions extract entire matches, or just subgroup matches, from
objects of class "orematch"
. They can also be applied to lists of
these objects, as returned by ore_search
when more than one
string is searched. For other objects they return NA
.
Usage
matches(object, ...)
## S3 method for class 'orematches'
matches(object, simplify = TRUE, ...)
## S3 method for class 'orematch'
matches(object, ...)
## Default S3 method:
matches(object, ...)
groups(object, ...)
## S3 method for class 'orematches'
groups(object, simplify = TRUE, ...)
## S3 method for class 'orematch'
groups(object, ...)
## S3 method for class 'orearg'
groups(object, ...)
## Default S3 method:
groups(object, ...)
Arguments
object |
An R object. Methods are provided for generic lists and
|
... |
Further arguments to methods. |
simplify |
For the list methods, should nonmatching elements be removed from the result? |
Value
A vector, matrix, array, or list of the same, containing full
matches or subgroups. If simplify
is TRUE
, the result may
have a dropped
attribute, giving the indices of nonmatching
elements.
See Also
[Package ore version 1.7.4.1 Index]