sparsity.Rd
Return the proportion of sparseness of a document-feature matrix, equal to the proportion of cells that have zero counts.
sparsity(x)
the document-feature matrix
dfmat <- dfm(data_corpus_inaugural, verbose = FALSE) sparsity(dfmat)#> [1] 0.9176184sparsity(dfm_trim(dfmat, min_termfreq = 5))#> [1] 0.7830391