corpus_clustering {R.temis} | R Documentation |
corpus_clustering
Description
Run a hierarchical clustering on documents of a corpus based on
a correspondence analysis. The number of axes from ca
which are
used depends on the value of the n
argument passed to corpus_ca
.
Usage
corpus_clustering(ca, n = 0)
Arguments
ca |
|
n |
Number of clusters to create. If 0 (the default), it is determined by clicking on the plot to choose the cut height. |
Value
A HCPC
object.
Examples
file <- system.file("texts", "reut21578-factiva.xml", package="tm.plugin.factiva")
corpus <- import_corpus(file, "factiva", language="en")
dtm <- build_dtm(corpus)
res <- corpus_ca(corpus, dtm, ncp=2, sparsity=0.98)
corpus_clustering(res, 3)
[Package R.temis version 0.1.3 Index]