Re: [R] About list to list - thanks

2006-04-11 Thread Muhammad Subianto
Thank you very much for your useful suggestions. These are exactly what I was looking for. foo - list(foo1, foo2, foo3) lapply(foo, function(x) matrix(unlist(x), nrow = length(x), byrow = TRUE)) or lapply(foo, function(x) do.call('rbind', x)) Best, Muhammad Subianto On 4/11/06, Muhammad

Re: [R] About list to list - thanks

2006-04-11 Thread Muhammad Subianto
Thank you very much for your useful suggestions. These are exactly what I was looking for. foo - list(foo1, foo2, foo3) lapply(foo, function(x) matrix(unlist(x), nrow = length(x), byrow = TRUE)) or lapply(foo, function(x) do.call('rbind', x)) Best, Muhammad Subianto On 4/11/06, Muhammad

Re: [R] About list to list - thanks

2006-04-11 Thread Gabor Grothendieck
One other thought. If they are all of the same dimension you could alternately consider putting them into a 3d array: library(abind) abind(lapply(foo, function(x) do.call(rbind, x)), along = 3) which may or may not have some advantage to you. On 4/11/06, Muhammad Subianto [EMAIL PROTECTED]