[R-sig-eco] Clustering large data

ONKELINX, Thierry Thierry.ONKELINX at inbo.be
Fri Oct 10 16:12:20 CEST 2008


Hi Hadley,

R ran out of memory. I got the "can't allocate vector of xxx mb" type of
error.

I did something like this.

Dataset #reading a two column (species, location) dataframe from a
database. 1154024 rows, 1381 species and 6354 locations.
Dataset$value <- 1
library(reshape)
cast(data = Dataset, formula = species ~ location) #this gave the error

Thierry

------------------------------------------------------------------------
----
ir. Thierry Onkelinx
Instituut voor natuur- en bosonderzoek / Research Institute for Nature
and Forest
Cel biometrie, methodologie en kwaliteitszorg / Section biometrics,
methodology and quality assurance
Gaverstraat 4
9500 Geraardsbergen
Belgium 
tel. + 32 54/436 185
Thierry.Onkelinx at inbo.be 
www.inbo.be 

To call in the statistician after the experiment is done may be no more
than asking him to perform a post-mortem examination: he may be able to
say what the experiment died of.
~ Sir Ronald Aylmer Fisher

The plural of anecdote is not data.
~ Roger Brinner

The combination of some data and an aching desire for an answer does not
ensure that a reasonable answer can be extracted from a given body of
data.
~ John Tukey

-----Oorspronkelijk bericht-----
Van: hadley wickham [mailto:h.wickham at gmail.com] 
Verzonden: vrijdag 10 oktober 2008 14:40
Aan: ONKELINX, Thierry
CC: Peter Solymos; r-sig-ecology at r-project.org
Onderwerp: Re: [R-sig-eco] Clustering large data

> Thanks for your responses. The biggest problem seems to be cast() for
> the reshape package which could not handle the dataset. Peter's
solution
> using the mefa package worked fine. I found an other solution: table()
> which works fine to crosstabulate presence-only data.

Exactly what error did you get?  Or did it just take a very long time
and then you gave up?  I have an experimental rewrite of the reshape
package that is more memory efficient and much faster (10 - 20x) -
however, it's still some time from being ready for production use.

Hadley


-- 
http://had.co.nz/

Dit bericht en eventuele bijlagen geven enkel de visie van de schrijver weer 
en binden het INBO onder geen enkel beding, zolang dit bericht niet bevestigd is
door een geldig ondertekend document. The views expressed in  this message 
and any annex are purely those of the writer and may not be regarded as stating 
an official position of INBO, as long as the message is not confirmed by a duly 
signed document.



More information about the R-sig-ecology mailing list