title: Convert tokens to corpus
body: <p>I have a variable name df which is a character vector.</p>
  
  <p>As a preprocessing step I would like to remove stopwords and my own list of stopwords. After that I would like to create a corpus from the previous example and a dfm.</p>
  
  <p>I use the following command lines:</p>
  
  <pre><code>library(quanteda)
  datastopwords_removed &lt;- tokens_remove(tokens(df2, remove_punct = TRUE), c(stopwords("english"), mystopwords$phrases))
  mycorpus &lt;- corpus(datastopwords_remove)
  myDfm &lt;- dfm(datastopwords_remove, ngrams = c(1,5))
  </code></pre>
  
  <p>But in corpus I receive this error:</p>
  
  <pre><code>Error in UseMethod("corpus") : 
    no applicable method for 'corpus' applied to an object of class "tokens"
  </code></pre>
  
  <p>How can I fix it? Also if I have in mystopword list phrases with more than one token should I make any special handling because it works and I didn't received an error so I suppose it removes them.</p>