Description Usage Arguments Value See Also Examples
Constructs a term-document matrix given a distributed corpus.
1 2 | ## S3 method for class 'DCorpus'
TermDocumentMatrix(x, control = list())
|
x |
A distributed corpus. |
control |
A named list of control options. The component
|
An object of class TermDocumentMatrix
containing a sparse
term-document matrix. The attribute Weighting
contains the
weighting applied to the matrix.
The documentation of termFreq
gives an extensive list of
possible options.
1 2 3 4 | data("crude")
tdm <- TermDocumentMatrix(as.DCorpus(crude),
list(stopwords = TRUE, weighting = weightTfIdf))
inspect(tdm[149:152,1:5])
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.