Re: [R] rbind for a list

2009-09-29 Thread Carlos Hernandez
On Tue, Sep 29, 2009 at 8:05 PM, David Winsemius wrote: > > On Sep 29, 2009, at 1:43 PM, Carlos Hernandez wrote: > > Dear All, >> I´m using the following code: >> >> all1<-gg2[[1]][[1]]; for(i in 1:48){ all1 <- rbind(all1,gg2[[i]][[1]]) } >> > > Looks to me that you would be getting a duplicate c

Re: [R] rbind for a list

2009-09-29 Thread David Winsemius
On Sep 29, 2009, at 1:43 PM, Carlos Hernandez wrote: Dear All, I´m using the following code: all1<-gg2[[1]][[1]]; for(i in 1:48){ all1 <- rbind(all1,gg2[[i]] [[1]]) } Looks to me that you would be getting a duplicate copy of the first matrix, but aside from that what problems are you expe

Re: [R] rbind for a list

2009-09-29 Thread Carlos Hernandez
Thank you for your quick reply! It works perfectly! On Tue, Sep 29, 2009 at 7:51 PM, Henrique Dallazuanna wrote: > Try this; > > do.call(rbind, sapply(gg2, '[', 1)) > > On Tue, Sep 29, 2009 at 2:43 PM, Carlos Hernandez > wrote: > > Dear All, > > I´m using the following code: > > > > all1<-gg2[[1

Re: [R] rbind for a list

2009-09-29 Thread Henrique Dallazuanna
Try this; do.call(rbind, sapply(gg2, '[', 1)) On Tue, Sep 29, 2009 at 2:43 PM, Carlos Hernandez wrote: > Dear All, > I´m using the following code: > > all1<-gg2[[1]][[1]]; for(i in 1:48){ all1 <- rbind(all1,gg2[[i]][[1]]) } > > to create a new matrix that contains all the matrices in a list call