Displaying 1 result from an estimated 1 matches for "maxcp".
Did you mean:
macp
2005 Mar 10
1
R_alloc with more than 2GB (PR#7721)
...me if it's actually a
feature:
In R, I can happily create large matrices:
> a= matrix(0, nrow=191481, ncol=3063)
> dim(a)
[1] 191481 3063
> length(a)*8 / 2^30
[1] 4.369812
but when I call R_alloc in some of my C code, I get
"negative length vectors are not allowed":
maxcp = 3063; n = 191481;
vs = (long) maxcp * (long) n;
mI = (double*) R_alloc(vs, sizeof(double));
I suspect this caused by allocString(int), which is called by R_alloc, see
below. Would it be possible to have allocString take a long argument as well?
These code excerpts are from R-devel_2005...