Ejects low frequency observations and subsamples
trim(wfm, min.count = 5, min.doc = 5, sample = NULL, verbose = TRUE)
| wfm | an object of class wfm, or a data matrix |
|---|---|
| min.count | the smallest permissible word count |
| min.doc | the fewest permissible documents a word can appear in |
| sample | how many words to randomly retain |
| verbose | whether to say what we did |
If sample is a number then this many words will be retained
after min.doc and min.doc filters have been applied.
Will Lowe