title: Filter rows/documents from Document-Term-Matrix in R
body: <p>Using the tm-package in R I create a Document-Term-Matrix:</p>
  
  <pre><code>dtm &lt;- DocumentTermMatrix(cor, control = list(dictionary=c("someTerm")))
  </code></pre>
  
  <p>Whichs results in something like this: </p>
  
  <pre><code>A document-term matrix (291 documents, 1 terms)
  
  Non-/sparse entries: 48/243
  Sparsity           : 84%
  Maximal term length: 8 
  Weighting          : term frequency (tf) 
  
                     Terms
  Docs                someTerm
  doc1                       0
  doc2                       0
  doc3                       7
  doc4                       22
  doc5                       0
  </code></pre>
  
  <p>Now I would like to filter this Document-Term-Matrix according to the number of the occurrences of someTerm in the documents. E.g. filter out only the documents where someTerm appears at least once. I.e. doc3 and doc4 here.  </p>
  
  <p>How can I achieve this? </p>