Description Usage Arguments Details Value Examples
Aggregate terms in a document-term matrix to according to groupings specified by a dictionary.
1 | combine_terms(dtm, dict)
|
dtm |
A |
dict |
A |
If several terms use the same transformation, they will be aggregated together.
Terms missing from dict
will be dropped.
An aggregated DocumentTermMatrix
object.
1 2 3 4 5 | file <- system.file("texts", "reut21578-factiva.xml", package="tm.plugin.factiva")
corpus <- import_corpus(file, "factiva", language="en")
dtm <- build_dtm(corpus)
dict <- dictionary(dtm)
combine_terms(dtm, dict)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.