sparsity | R Documentation |
Return the proportion of sparseness of a document-feature matrix, equal to the proportion of cells that have zero counts.
sparsity(x)
x |
the document-feature matrix |
dfmat <- dfm(tokens(data_corpus_inaugural))
sparsity(dfmat)
sparsity(dfm_trim(dfmat, min_termfreq = 5))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.