combine_terms {R.temis} | R Documentation |
combine_terms
Description
Aggregate terms in a document-term matrix to according to groupings specified by a dictionary.
Usage
combine_terms(dtm, dict)
Arguments
dtm |
A |
dict |
A |
Details
If several terms use the same transformation, they will be aggregated together.
Terms missing from dict
will be dropped.
Value
An aggregated DocumentTermMatrix
object.
Examples
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)
[Package R.temis version 0.1.3 Index]