tm_gregexpr: Call gregexpr on the content of a tm Corpus.

View source: R/text_searching.R

tm_gregexprR Documentation

Call gregexpr on the content of a tm Corpus.

Description

Pull out content of a tm corpus and call gregexpr on that content represented as a list of character strings.

Usage

tm_gregexpr(
  pattern,
  corpus,
  ignore.case = FALSE,
  perl = FALSE,
  fixed = FALSE,
  useBytes = FALSE
)

Arguments

pattern

See gregexpr

corpus

Either a character vector or tm Corpus object.

ignore.case

See gregexpr

perl

See gregexpr

fixed

See gregexpr

useBytes

See gregexpr

Details

If 'corpus' is already a character vector, it just calls gregexpr with no fuss (or warning).

Value

This method gives results exactly as if gregexpr were called on the Corpus represented as a list of strings.

See gregexpr.

See Also

gregexpr


textreg documentation built on Sept. 17, 2026, 1:07 a.m.