title: R remove stopwords from text without tokenizing & transforming data into list
body: <p>I need to remove stopwords from texts without tokenizing or changing the object into a list. I get an error when I use the rm_stopwords function. Can anyone help me out?</p>
  <pre><code>test&lt;- data.frame(words = c(&quot;hello there, everyone&quot;, &quot;the most amazing planet&quot;), id = 1:2)
  test$words &lt;- rm_stopwords(test$words, tm::stopwords(&quot;english&quot;), separate = F, unlist = T)
  #Error in `$&lt;-.data.frame`(`*tmp*`, words, value = c(&quot;hello&quot;, &quot;everyone&quot;,  : 
    #replacement has 4 rows, data has 2
  
  #I want something like this, where the stopwords are removed but the rest of the formatting remains intact (e.g. punctuation) 
  
  #                words     id
  #1    hello  , everyone     1
  #2    amazing planet        2
  </code></pre>