Brian Vanover Brian Vanover - 1 year ago 253
R Question

Adding custom stopwords in R tm

I have a Corpus in R using the

package. I am applying the
function to remove stopwords

tm_map(abs, removeWords, stopwords("english"))

Is there a way to add my own custom stop words to this list?

Answer Source

stopwords just provides you with a vector of words, just combine your own ones to this.

tm_map(abs, removeWords, c(stopwords("english"),"my","custom","words")) 
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download