Re: [R] Efficient manipulation with list object

2018-06-10 Thread Jeff Newmiller
> Rui Barradas >>> >>> >>> >>> Enviado a partir do meu smartphone Samsung Galaxy. >>> Mensagem original >>> De: Christofer Bogaso >>> Data: 10/06/2018 16:33 (GMT+00:00) >>> Para: r-help >>> Assunto

Re: [R] Efficient manipulation with list object

2018-06-10 Thread Benjamin Christoffersen
>> >> >> >> Enviado a partir do meu smartphone Samsung Galaxy. >> ---- Mensagem original ---- >> De: Christofer Bogaso >> Data: 10/06/2018 16:33 (GMT+00:00) >> Para: r-help >> Assunto: [R] Efficient manipulation with list object >>

Re: [R] Efficient manipulation with list object

2018-06-10 Thread Christofer Bogaso
s, > > Rui Barradas > > > > Enviado a partir do meu smartphone Samsung Galaxy. > Mensagem original > De: Christofer Bogaso > Data: 10/06/2018 16:33 (GMT+00:00) > Para: r-help > Assunto: [R] Efficient manipulation with list object > > Hi, &

Re: [R] Efficient manipulation with list object

2018-06-10 Thread ruipbarradas
0:00) Para: r-help Assunto: [R] Efficient manipulation with list object Hi, I have a list of length 10,000, and each element of that list is a matrix with 3 columns and 2,000 rows. Now when I tried to make a Matrix object with that list using Reduce('rbind', list), my code is taking a

Re: [R] Efficient manipulation with list object

2018-06-10 Thread Eric Berger
Sorry typos Try this. Suppose your list of matrices is in the list locL. nc <- 3 locL2 <- list() for ( i in 1:length(locL) ) locL2[[i]] <- as.numeric( t( locL[[i]] ) ) bigMat <- matrix(unlist(locL2), ncol=nc, byrow=TRUE) HTH, Eric On Sun, Jun 10, 2018 at 7:10 PM, Eric Berger wrote: > Try

Re: [R] Efficient manipulation with list object

2018-06-10 Thread Eric Berger
Try this. Suppose your list of matrices is in the list locL. nc <- 3 locL2 <- list() for ( i in 1:length(locL ) locL2[[i]] <- as.numeric(t(locL[[i]])) bigMat <- matrix(unlist(locL3), ncol=nc, byrow=TRUE) HTH, Eric On Sun, Jun 10, 2018 at 6:33 PM, Christofer Bogaso < bogaso.christo...@gmail.

[R] Efficient manipulation with list object

2018-06-10 Thread Christofer Bogaso
Hi, I have a list of length 10,000, and each element of that list is a matrix with 3 columns and 2,000 rows. Now when I tried to make a Matrix object with that list using Reduce('rbind', list), my code is taking a considerable amount of time. Is there any way to implement same above task in more