Description Usage Arguments Value Examples
Remove sparse terms from a document-term or term-document matrix.
1 | removeSparseTerms(x, sparse)
|
x |
A |
sparse |
A numeric for the maximal allowed sparsity in the range from bigger zero to smaller one. |
A term-document matrix where those terms from x
are
removed which have at least a sparse
percentage of empty (i.e.,
terms occurring 0 times in a document) elements. I.e., the resulting
matrix contains only terms with a sparse factor of less than
sparse
.
1 2 3 | data("crude")
tdm <- TermDocumentMatrix(crude)
removeSparseTerms(tdm, 0.2)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.