subset_corpus: Return Works of a Corpus that Include Matching Text

Description Usage Arguments Details Value Examples

View source: R/subset_corpus.R

Description

subset_corpus returns the works in a corpus whose texts include all of the words (or match the stringi-search-regex) specified in the 'pattern' argument.

Usage

1

Arguments

corpus

A dataframe representing a corpus of downloaded texts generated by build_corpus.

pattern

A character string (or vector) containing a series of words or a stringi-search-regex.

Details

subset_corpus returns the works in a corpus whose texts include all of the words (or match the stringi-search-regex) specified in the 'pattern' argument. It can therefore be used to identify a subset of the corpus that is of particular interest.

Value

A dataframe

Examples

1
2
3
4
## Not run: 
 miasma_yf <- subset_corpus(yf_corpus, "miasma")

## End(Not run)

mariolaespinosa/historicalnetworks documentation built on Feb. 9, 2022, 12:31 p.m.