title: How To: Check Frequency Weighting in a Term Document Matrix, in 'topicmodels'
body: <p>I'm attempting to do some topic modeling using the R package <code>topicmodels</code></p>
  
  <p>I've done my pre-processing using the 'tm' package, per these instructions <a href="https://stackoverflow.com/questions/7927367/r-text-file-and-text-mining-how-to-load-data">R text file and text mining...how to load data</a>. </p>
  
  <p>However, when I go to run my correlated topic model (CTM) using <code>topicmodels</code> in R, I receive the following error </p>
  
  <pre><code> "Error in CTM...DocumentTermMatrix needs to have a term frequency weighting. 
  </code></pre>
  
  <p>I've triple checked the structure of my DocumentTermMatrix shows it does have a frequency weighting: </p>
  
  <pre><code> A document-term matrix (26 documents, 413 terms)
  
   Non-/sparse entries: 4804/5934
   Sparsity           : 55%
   Maximal term length: 13 
   Weighting          : term frequency - inverse document frequency (normalized) (tf-idf)
  </code></pre>
  
  <p>Any suggestions on how to get this working would be appreciated!</p>