From p.dalgaard@biostat.ku.dk  Fri Dec 15 00:10:53 2000
From: p.dalgaard@biostat.ku.dk (Peter Dalgaard BSA)
Date: 15 Dec 2000 01:10:53 +0100
Subject: [Rd] cannot allocate vector of size in merge (PR#765)
In-Reply-To: Viktor Moravetski's message of "Thu, 14 Dec 2000 15:54:23 -0800"
References: <200012142306.AAA24559@pubhealth.ku.dk> <qxp3dfqshuc.fsf@verdi.stat.wisc.edu> <3A395DAF.C4262ADC@pdf.com>
Message-ID: <x2wvd21r3m.fsf@blueberry.kubism.ku.dk>

Viktor Moravetski <viktorm@pdf.com> writes:

> Hi Saikat,
> Yes, I don't need to specify nsize and vsize for version 1.2.0. 
> But error is the same, even if start R with default parameters. 
> It grows in memory and then gives an error. 
> See output below:
> > gc()
>           used (Mb) gc trigger (Mb)
> Ncells  358534  9.6     597831 16.0
> Vcells 3330352 25.5    3736477 28.6
> > df <- data.frame(x=1:30000,y=2,z=3)
> > merge(df,df)
> Error: cannot allocate vector of size 3515625 Kb

I think you're just experiencing the fact that the merge() function in
R is not implemented very efficiently (to say the least). For many
practical purposes, this can be worked around using e.g. match().

Contributions are welcome...

-- 
   O__  ---- Peter Dalgaard             Blegdamsvej 3  
  c/ /'_ --- Dept. of Biostatistics     2200 Cph. N   
 (*) \(*) -- University of Copenhagen   Denmark      Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard@biostat.ku.dk)             FAX: (+45) 35327907
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._


[Rd] cannot allocate vector of size in merge (PR#765)
Peter Dalgaard BSA