featfreq: Compute the frequencies of features

View source: R/dfm_weight.R

featfreqR Documentation

Compute the frequencies of features

Description

For a dfm object, returns a frequency for each feature, computed across all documents in the dfm. This is equivalent to colSums(x).

Usage

featfreq(x)

Arguments

x

a dfm

Value

a (named) numeric vector of feature frequencies

See Also

dfm_tfidf(), dfm_weight()

Examples

dfmat <- dfm(data_char_sampletext)
featfreq(dfmat)

quanteda documentation built on May 31, 2023, 8:28 p.m.