Compute the sparsity of a document-feature matrix
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(data_corpus_inaugural) sparsity(dfmat) sparsity(dfm_trim(dfmat, min_termfreq = 5))
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.