sparsity: Compute the sparsity of a document-feature matrix

Description Usage Arguments Examples

View source: R/dfm-methods.R

Description

Return the proportion of sparseness of a document-feature matrix, equal to the proportion of cells that have zero counts.

Usage

1

Arguments

x

the document-feature matrix

Examples

1
2
3
dfmat <- dfm(data_corpus_inaugural)
sparsity(dfmat)
sparsity(dfm_trim(dfmat, min_termfreq = 5))

koheiw/quanteda.core documentation built on Sept. 21, 2020, 3:44 p.m.