title: plyr split_indices function crashes for long vectors
body: <p>I am trying to run <code>acast</code> function from the package <code>reshape2</code> on a large data set, and getting the program crash. I was able to localize this problem:</p>
  
  <pre><code>library(plyr)
  n &lt;- 15784000
  g &lt;- 1:n
  split_indices(g, n) # NOTE for copy/pasters:
                      # this may result in an abort and R exit
  </code></pre>
  
  <p>I am getting the following error message:</p>
  
  <pre><code>*** caught segfault *** address 0x7ffffc3c44f0, cause 'memory not mapped'
  
  Traceback:
   1: .Call("split_indices", group, as.integer(n))
   2: split_indices(g, n)
  </code></pre>
  
  <p>If I reduce the value of n:</p>
  
  <pre><code>n &lt;- 3946000
  </code></pre>
  
  <p>then the error message is different:</p>
  
  <pre><code>Error: segfault from C stack overflow
  </code></pre>
  
  <p>The R system I am using:</p>
  
  <pre><code>&gt; sessionInfo()
  R version 2.15.2 (2012-10-26)
  Platform: x86_64-unknown-linux-gnu (64-bit)
  Package: plyr_1.8
  </code></pre>
  
  <p>Is this a distribution/build problem? Can it be fixed by appropriate choice of build parameters and how?</p>