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