zoom_re.default: Zoom in on the items that contain a regular expression match

Description Usage Arguments Value Examples

Description

Generic function that takes as its first argument x an object that represents a collection of linguistic units, for instance an object of the class "freqlist", and extracts from it those units that contain a match for the regular expression pattern.

Usage

1
2
## Default S3 method:
zoom_re(x, pattern, perl = TRUE)

Arguments

x

an object that represents a collection of linguistic units, for instance an object of the class "freqlist"

pattern

a character vector (assumed to be of length 1) containing a regular expression

perl

a boolean vector (assumed to be of length 1) that determines whether or not the Perl flavor of regular expressions is assumed

Value

Returns an object containing the items that match the regular expression.

Examples

1
2
x <- freqlist("The man and the mouse.", as_text = TRUE)
zoom_re(x, "a")

wai-wong-reimagine/mclm documentation built on May 16, 2019, 9:12 p.m.