title: Problems with TermDocumentMatrix function in R
body: <p>I'm trying to create a <em>TermDocumentMatrix</em> using <em>tm</em> package, but seem to have encountered difficulties.</p>
  
  <p>The input:</p>
  
  <pre><code>trainDF&lt;-as.matrix(list("I'm going home", "trying to fix this", "when I go home"))
  </code></pre>
  
  <p>Goal - creating a TDM from the input: (not all controls parameters listed below) </p>
  
  <pre><code>control &lt;- list(
      weight= weightTfIdf, 
      removeNumbers=TRUE, 
      removeStopwords=TRUE, 
      removePunctuation=TRUE,    
      stemWords=TRUE, 
      maxWordLength=maxWordL,
      bounds=list(local=c(minDocFreq, maxDocFreq))
  )
  
  tdm&lt;- TermDocumentMatrix(Corpus(DataframeSource(trainDF)),control = control)
  </code></pre>
  
  <p>The error I get:</p>
  
  <pre><code>Warning message:
  In is.na(x) : is.na() applied to non-(list or vector) of type 'NULL'
  </code></pre>
  
  <p>And the tdm object is empty. Any ideas?</p>