R remove specific word in a txte like: the this
<pre><code>txt &lt;- readLines("this.txt")

library(tm)

corpus &lt;- Corpus(VectorSource(txt))

corpus &lt;- tm_map (corpus, removePunctuation)

tdm &lt;- TermDocumentMatrix (corpus)

m &lt;- as.matrix (tdm)

d &lt;- data.frame(freq = sort(rowSums(m),decreasing = TRUE))
</code></pre>