Learn R Programming

quanteda (version 0.7.2-1)

docfreq: get the document frequency of a feature

Description

Returns the document frequency of a feature in a dfm-class object, which occurs greater than a threshold.

Usage

docfreq(object, threshold = 0)

## S3 method for class 'dfmDense,numeric': docfreq(object, threshold = 0)

## S3 method for class 'dfmDense,missing': docfreq(object, threshold = 0)

## S3 method for class 'dfmSparse,numeric': docfreq(object, threshold = 0)

## S3 method for class 'dfmSparse,missing': docfreq(object, threshold = 0)

## S3 method for class 'dfm,numeric': docfreq(object, threshold = 0)

## S3 method for class 'dfm,missing': docfreq(object, threshold = 0)

Arguments

object
a dfm-class document-feature matrix
threshold
numeric value of the threshold for counting a feature as existing in the document, default is 0