Reputation: 575
I built a document-term-matrix with tm package in R. There are 18000 terms and most of them are not frequent. I want to remove the terms with less than 0.0001 frequency in order to decrease the number of columns.
Upvotes: 0
Views: 736
Reputation: 428
removeSparseTerms(DocumentTermMatrix(corpus),0.995)
and you can change sparse argument as you like for your problem
Upvotes: 0