title: r data.table::dcast cross product fails on large data set
body: <p>i have a <code>dcast()</code> application whose cross-product exceeds <code>.Machine$integer.max</code>.  is there a recommended alternative to dealing with this situation?  i could break up <code>w</code> into smaller pieces, but was hoping for a clean solution.</p>
  
  <p>this might be a duplicate of <a href="https://stackoverflow.com/questions/47823520/r-error-when-applying-dcast-to-a-large-data-table-object">R error when applying dcast to a large data.table object</a> but that question also doesn't have an answer.</p>
  
  <p>thanks!</p>
  
  <pre><code>library(data.table)
  
  # three million x one thousand
  w &lt;- data.table( x = 1:3000000 , y = 1:1000 )
  
  z &lt;- data.table::dcast( w , x ~ y , value.var = 'x' )
  # Error in CJ(1:3000000, 1:1000) : 
    # Cross product of elements provided to CJ() would result in 3e+09 rows which exceeds .Machine$integer.max == 2147483647
  </code></pre>