Learn R Programming

RcmdrPlugin.temis (version 0.6.1)

termChisqDist: Show terms co-occurrences

Description

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

Usage

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