Learn R Programming

tm (version 0.5-9.1)

tm_intersect: Intersection between Documents and Words

Description

Perform intersection on text documents and words.

Usage

## S3 method for class 'PlainTextDocument':
tm_intersect(x, y)

Arguments

x
A text document.
y
A character vector of words to be intersected with.

Value

  • A logical value indicating whether a word in y appears in x.

See Also

getFilters to list available filter functions.

Examples

Run this code
data("crude")
crude[[1]]
tm_intersect(crude[[1]], c("crude", "oil"))
tm_intersect(crude[[1]], "acquisition")

Run the code above in your browser using DataLab