R.temis (version 0.1.3)

extreme_docs: extreme_docs

Description

Print documents which have the most extreme coordinations on an axis of correspondence analysis.

Usage

extreme_docs(corpus, ca, axis, ndocs = 10, nterms = 25)

Arguments

corpus

A Corpus object.

ca

A CA object.

axis

The CA axis to consider.

ndocs

The number of (most contributive) documents to print.

nterms

The number of terms to highlight in documents.

Value

Corpus object (invisibly).

Details

Occurrences of the nterms most extreme terms are highlighted. If stemming or other transformations have been applied to original words using combine_terms, all original words which have been transformed to the specified terms are highlighted.

Examples

Run this code
# NOT RUN {
file <- system.file("texts", "reut21578-factiva.xml", package="tm.plugin.factiva")
corpus <- import_corpus(file, "factiva", language="en")
dtm <- build_dtm(corpus)
ca <- corpus_ca(corpus, dtm)
contributive_docs(corpus, ca, 1)

# Also works when terms have been combined
dict <- dictionary(dtm)
dtm2 <- combine_terms(dtm, dict)
ca2 <- corpus_ca(corpus, dtm2)
extreme_docs(corpus, ca2, 1)

# }

Run the code above in your browser using DataLab