Skip to content

slightly inconsistent behavior

2 messages · ivo welch, Brian Ripley

#
dear R experts:

This is just a minor, minor nuisance, but I thought I would point it out:
+                   na.strings=c("NaN", "C","I","M", "E"), sep=",",
as.is=T, nrows=99999999);
Error: cannot allocate vector of size 781249 Kb

If I extend nrows by a few more 9's, the error goes away.  Similarly,
if I use much fewer observations, the error goes away.

regards,

/iaw
#
What do you think is `slightly inconsistent behavior' here?  (You seem to 
be quite consistent in not telling us such relevant facts, including your 
OS and version of R!)

If you think that the memory usage of R should be monotone in the size of 
the problem, your expectations are unfounded.  Here it is likely you are 
seeing memory fragmentation on a 32-bit OS: see help("Memory-limits").

But setting nrows=99999999 and 'extend nrows by a few more 9's' seems to 
me suggesting something like nrows=9999999999 which is invalid and gives
a warning message you did not mention.
On Tue, 26 Dec 2006, ivo welch wrote:

            
PLEASE do, at long last.