Re: [R-sig-eco] problem using reshape package

2009-07-09 Thread Maria Dulce Subida
ds, Dulce -Mensaje original- De: psoly...@gmail.com [mailto:psoly...@gmail.com] En nombre de Peter Solymos Enviado el: jueves, 09 de julio de 2009 17:25 Para: Maria Dulce Subida CC: r-sig-ecology@r-project.org Asunto: Re: [R-sig-eco] problem using reshape package Hi, something like this

Re: [R-sig-eco] problem using reshape package

2009-07-09 Thread Peter Solymos
Hi, something like this might help: ## your toy data set d <- data.frame(SITE=rep(c("I","II"), each=3), SPECIES=rep(LETTERS[1:3], 2), Replicate1=c(1,2,1,4,1,6), Replicate2=c(3,5,0,2,0,3), Replicate3=c(0,1,2,0,0,3)) ## required for functions inflate, stcs and mefa library(mefa) #

Re: [R-sig-eco] problem using reshape package

2009-07-09 Thread Gavin Simpson
On Thu, 2009-07-09 at 13:37 +0200, Maria Dulce Subida wrote: > Hello everyone! > However, when I use the same code in my real data set which is considerably > larger (73 sites and 7 replicates for site, resulting in a molten matrix of > 14469 x 4), the cast function does some kind of aggregation

Re: [R-sig-eco] problem using reshape package

2009-07-09 Thread Maria Dulce Subida
Hi Michael, matrify() world work if I had only one column with abundances. In my original data frame I have 1 sample.id column, 1 taxon column but 7 abundance columns (corresponding to 7 replicates taken within each sample). I am quite sure that the cast()function within the reshape package shou

Re: [R-sig-eco] problem using reshape package

2009-07-09 Thread Michael Denslow
Hi Dulce, On Thu, Jul 9, 2009 at 7:37 AM, Maria Dulce Subida wrote: > Hello everyone! > > I'm having a problem in casting a data frame with the reshape package. I > have an original data set of species abundances in replicate samples at > certain sites, with the following form: > > > > SITE   SPEC

[R-sig-eco] problem using reshape package

2009-07-09 Thread Maria Dulce Subida
Hello everyone! I'm having a problem in casting a data frame with the reshape package. I have an original data set of species abundances in replicate samples at certain sites, with the following form: SITE SPECIES Replicate1 Replicate2 Replicate3 I A 1