[R] allocMatrix limits
Vadim Kutsyy
vadim at kutsyy.com
Fri Aug 1 00:43:56 CEST 2008
>> I am getting an error "allocMatrix: too many elements specified" when
>> I am trying to create large matrix or vector (about 1 billion elements).
>>
>> How can I find out limits on allocMatrix? Can I increase them?
>
> ?"Memory-limits", and you cannot increase them unless you have a
> system which has larger signed integers.
>
Thank you for pointing out this.
The problem is in array.c, where allocMatrix check for "if ((double)nrow
* (double)ncol > INT_MAX)". But why itn is used and not long int for
indexing? (max int is 2147483647, max long int is 9223372036854775807)
Thanks,
Vadim
More information about the R-help
mailing list