Learn R Programming

RNewsflow (version 1.2.6)

get_overlap_terms: View overlapping terms for a given pair of documents

Description

View overlapping terms for a given pair of documents

Usage

get_overlap_terms(dtm, doc.x, doc.y, dtm.y = dtm)

Value

A character vector

Arguments

dtm

A quanteda dfm

doc.x

The name of the first document in dtm

doc.y

The name of the second document in dtm (or dtm.y)

dtm.y

Optionally, a second dtm (for when the documents occur in separate dtm's)

Examples

Run this code
get_overlap_terms(rnewsflow_dfm, 
                  quanteda::docnames(rnewsflow_dfm)[1],
                  quanteda::docnames(rnewsflow_dfm)[5])

Run the code above in your browser using DataLab