title: Row sum for large term-document matrix / simple_triplet_matrix ?? {tm package}
body: <p>So I have a very large term-document matrix:</p>
  
  <pre><code>&gt; class(ph.DTM)
  [1] "TermDocumentMatrix"    "simple_triplet_matrix"
  
  &gt; ph.DTM
  A term-document matrix (109996 terms, 262811 documents)
  
  Non-/sparse entries: 3705693/28904453063
  Sparsity           : 100%
  Maximal term length: 191 
  Weighting          : term frequency (tf)
  </code></pre>
  
  <p>How do I get the rowSum (frequency) of each term? I tried:</p>
  
  <pre><code>&gt; apply(ph.DTM, 1, sum)
  Error in vector(typeof(x$v), nr * nc) : vector size cannot be NA
  In addition: Warning message:
  In nr * nc : NAs produced by integer overflow
  </code></pre>
  
  <p>Obviously, I know about <code>removeSparseTerms</code>:</p>
  
  <pre><code>ph.DTM2 &lt;- removeSparseTerms(ph.DTM, 0.99999)
  </code></pre>
  
  <p>Which cuts down the size a bit:</p>
  
  <pre><code>&gt; ph.DTM2
  A term-document matrix (28842 terms, 262811 documents)
  
  Non-/sparse entries: 3612620/7576382242
  Sparsity           : 100%
  Maximal term length: 24 
  Weighting          : term frequency (tf)
  </code></pre>
  
  <p>But I still cannot apply any matrix-related functions to it:</p>
  
  <pre><code>&gt; as.matrix(ph.DTM2)
  Error in vector(typeof(x$v), nr * nc) : vector size cannot be NA
  In addition: Warning message:
  In nr * nc : NAs produced by integer overflow
  </code></pre>
  
  <p><strong>How can I just get a simple row sum on this object?? Thanks!!</strong></p>