title: Quanteda: how to remove my own list of words
body: <p>Since there is no ready implementation of stopwords for Polish in quanteda, I would like to use my own list. I have it in a text file as a list separated by spaces. If need be, I can also prepare a list separated by new lines.</p>
  
  <p>How can I remove the custom long list of stopwords from my corpus? 
  How can I do that after stemming?</p>
  
  <p>I have tried creating various formats, converting to string vectors like</p>
  
  <pre><code>stopwordsPL &lt;- as.character(readtext("polish.stopwords.txt",encoding = "UTF-8"))
  stopwordsPL &lt;- read.txt("polish.stopwords.txt",encoding = "UTF-8",stringsAsFactors = F))
  stopwordsPL &lt;- dictionary(stopwordsPL)
  </code></pre>
  
  <p>I have also tried to use such vectors of words in syntax</p>
  
  <pre><code>myStemMat &lt;-
    dfm(
      mycorpus,
      remove = as.vector(stopwordsPL),
      stem = FALSE,
      remove_punct = TRUE,
      ngrams=c(1,3)
    )
  
  dfm_trim(myStemMat, sparsity = stopwordsPL)
  </code></pre>
  
  <p>or</p>
  
  <pre><code>myStemMat &lt;- dfm_remove(myStemMat,features = as.data.frame(stopwordsPL))
  </code></pre>
  
  <p>Nothing works. My stopwords show up in the corpus and in the analysis. What should be the proper way/syntax to apply custom stop words?</p>