quanteda (version 4.0.1)

featfreq: 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)

Value

a (named) numeric vector of feature frequencies

Arguments

x

a dfm

See Also

dfm_tfidf(), dfm_weight()

Examples

Run this code
dfmat <- dfm(tokens(data_char_sampletext))
featfreq(dfmat)

Run the code above in your browser using DataLab