Learn R Programming

ore (version 1.0.6)

matches: 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 'list': matches(object, ...)

## S3 method for class 'orematch': matches(object, ...)

## S3 method for class 'default': matches(object, ...)

groups(object, ...)

## S3 method for class 'list': groups(object, ...)

## S3 method for class 'orematch': groups(object, ...)

## S3 method for class 'default': groups(object, ...)

Arguments

object
An R object. Methods are provided for generic lists and "orematch" objects.
...
Further arguments to methods. Unused here.

Value

  • A vector, matrix, array, or list of the same, containing full matches or subgroups.

See Also

ore.search