title: Efficiently combine many Document Term Matrices
body: <p>If I have a list of many document term matrices I can do this to combine them:</p>
  
  <pre><code># setup for example
  require(tm)
  data("acq")
  data("crude")
  acq_dtm &lt;- DocumentTermMatrix(acq)
  crude_dtm &lt;- DocumentTermMatrix(crude)
  # make list of dtms
  list_of_dtms &lt;- list(acq_dtm, crude_dtm)
  # convert list of dtms into one big dtm
  dtms_combined_into_one &lt;- do.call(tm:::c.DocumentTermMatrix, list_of_dtms)
  </code></pre>
  
  <p>But this seems very slow and memory intensive, and is a major bottleneck when dealing with a few thousand dtms. How can I combine them faster and using less memory? </p>
  
  <p>Since the dtm is a sparse matrix, I wonder if anyone knows of a method for combining sparse matrices that might be useful here. I'm my actual use-case I am not starting with a corpus but lists of word counts.</p>
  
  <p>Here's an rfiddle, in case that's useful for quick testing: <a href="http://www.r-fiddle.org/#/fiddle?id=SojC9ZlA" rel="nofollow">http://www.r-fiddle.org/#/fiddle?id=SojC9ZlA</a> (seems promising, but I haven't found it very reliable, is there anything good for this kind of quick prototyping, that can install packages?)</p>