title: Removing @mentions using the 'tm' package R
body: <p>I have a corpus of tweets and some of them have @mentions which I want to remove, I am using the <code>tm_map</code> function of the <code>tm package</code> but not getting the desired result. Here is an example:</p>
  
  <pre><code>tweetscorrected[[1]]$content
  &gt;@abc thank you for the treat
  tweetmentionsremoved&lt;- tm_map(tweetscorrected, removeWords, "@\\w+")
  tweetmentionsremoved[[1]]$content
  &gt;@abc thank you for the treat
  tweetmentionsremoved&lt;- tm_map(tweetscorrected, removeWords, "y\\w+")
  &gt;@abc thank for the treat
  tweetmentionsremoved&lt;- tm_map(tweetscorrected, removeWords, "a\\w+")
  &gt;@ thank you for the treat
  </code></pre>
  
  <p>Hence what I see is any 'alphabet' is getting rightly removed but the '@' condition does no changes at all. But I want to remove @abc, @xyz basically any 'word' that begins with @.</p>
  
  <p>Any help is highly appreciated.</p>