termChisqDist: Show terms co-occurrences

Description Usage Arguments Details See Also

Description

Show terms that are the most associated with one or several reference terms.

Usage

1
termChisqDist(term, dtm, n = 5, variable = NULL)

Arguments

term

A character vector of length 1 corresponding to the name of a column of dtm.

dtm

A document-term matrix.

n

The number of terms to return.

variable

An optional vector of the same length as the number of rows in dtm, giving the levels by which results should be reported.

Details

This function allows printing the terms that are most associated with one or several given terms, according to the document-term matrix of the corpus. Co-occurrence is measured by the Chi-squared distance between the (column) profiles of two terms in the matrix: the smaller the distance, the more terms have similar occurrence patterns.

When a variable is selected, the operation is run separately on each sub-matrix constituted by the documents that are members of the variable level. If the term does not appear in a level, NA is returned.

See Also

termCoocDlg, DocumentTermMatrix, restrictTermsDlg, termsDictionary, freqTermsDlg


RcmdrPlugin.temis documentation built on May 2, 2019, 5:21 p.m.