[R] 'combinations' in gtools and stack overflow

Ho-Joon Lee lee at molgen.mpg.de
Mon Feb 14 15:47:02 CET 2005


Dear R-users,

Let me ask about the 'stack overflow' error which I got when I used 
the function 'combinations' in "gtools".

The following is what I did:

---------
library(gtools)
options(expressions=1e5)
combinations(500, 3, 1:500)
# or combinations(400, 2, 1:400)
Error: protect(): stack overflow
---------

How can I overcome this error? 
Is there perhaps any other function to do this more efficiently?

Hope that somone can help me out.
Thanks in advance.

Lee

P.S. R 2.0.0; alphaev68-dec-osf4.0f




More information about the R-help mailing list