[Rd] cannot allocate vector of size in merge (PR#765)
Peter Dalgaard BSA
p.dalgaard@biostat.ku.dk
15 Dec 2000 01:10:53 +0100
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._