Skip to content

Error: cannot allocate vector of size

7 messages · xin123620, Jeff Newmiller, jim holtman

#
Dear R Users,

I was using R to import five years traffic data, but the error always come
up as shown below. The data frame contains 12 columns and unknown number of
records. Would you have any ideas that how I should deal with this
situation?? Many thanks for any hints.
Error: cannot allocate vector of size 24.0 Mb
In addition: There were 16 warnings (use warnings() to see them)
[1] 1535.62
[1]16.24
used (Mb) gc trigger   (Mb)  max used   (Mb)
Ncells  141802  3.8    6160587  164.6   5130092  137.0
Vcells 1100479  8.4  200894152 1532.8 184314496 1406.3


Best,
Chengxin


--
View this message in context: http://r.789695.n4.nabble.com/Error-cannot-allocate-vector-of-size-tp3629384p3629384.html
Sent from the R help mailing list archive at Nabble.com.
#
Thank you Jeff. You are absolutely right. I just edited the R and computer
info in: R is 32 bit; computer is his computer is Windows XP, 32bit Intel(R)
Core(TM) E8400 at 3.GHz, 2.99GHz, 2.95GB of RAM. 

The data I am trying to retrieve is through postgre from a university
server. I checked the postgre for a while but still wouldn't find the number
of total records. Would you give some hints please? Thank you very much. 

--
View this message in context: http://r.789695.n4.nabble.com/Error-cannot-allocate-vector-of-size-tp3629384p3631168.html
Sent from the R help mailing list archive at Nabble.com.
#
select count(*) from yourData
On Tue, Jun 28, 2011 at 3:07 PM, xin123620 <chengxin.dai at gmail.com> wrote:

  
    
#
Assuming that your column are numeric, you would need 4GB of memory
just to store one copy of the object.  If this is 5 years, then you
would need almost 1GB for a copy, but the processing probably will use
up twice as much as it is processing.  Try reading a month's worth and
see how much you use.  In problems like this, you creep up on it; you
just try to jump in all at once.  Do it in increments and watch the
usage.
On Tue, Jun 28, 2011 at 4:18 PM, xin123620 <chengxin.dai at gmail.com> wrote:

  
    
#
Thank you for replying. when I've tried to run the R syntax in a 64 bit
computer,the problem is solved.  Thank you for helping out. I totally agree
your advice. 
I would like to answer all your questions in case other people meet the same
problem. The data contains one timestamp column with time zone, one integer
column, and 12 Boolean columns. I tried to run one month sample, 
before
[1] 3583
[1] 156.82
[1] 241.06
After
[1] 3583
[1] 199.97
[1] 241.56





--
View this message in context: http://r.789695.n4.nabble.com/Error-cannot-allocate-vector-of-size-tp3629384p3633983.html
Sent from the R help mailing list archive at Nabble.com.