Usage
term.freq( d,
topN = 0,
percent = 0,
sorted = c("none", "alpha", "freq"),
decreasing = FALSE,
useDocFreq = FALSE,
minFreq = 1 )
Arguments
d
The corpus from which term frequencies are calculated.
topN
If specified, only the 'topN' most frequent terms are returned. If more terms are requested than available, all terms are returned. If both 'topN' and 'percent' are zero, then all terms are returned.
percent
If specified, only the top 'percent' % most frequent terms are returned. If more terms are requested than available, all terms are returned. If both 'topN' and 'percent' are zero, then all terms are returned.
sorted
A string specifying how to sort the terms. 'none' for no sorting, 'alpha' for alphanumeric sorting, and 'freq' for sorting by frequency.
decreasing
If TRUE, terms are sorted in decreasing order, if FALSE, sorted ascending order.
useDocFreq
If TRUE, the returned frequencies are for the total number of documents in which the term occurs. If false, they are the total number of occurrences.
minFreq
Terms with *TOTAL* frequencies below this threshold will not be included in the output.