Re: [R] Collecting results of a test with array

2012-05-25 Thread Bert Gunter
?abind ## in R package abind. Very handy for this sort of thing Something like: do.call(abind, yourlist) You can also do it by hand along the lines Michael described: e.g. something like array(unlist(yourlist), dim = c(2,3, 12) ) -- Bert On Fri, May 25, 2012 at 6:16 AM, R. Michael Weylandt

Re: [R] Collecting results of a test with array

2012-05-25 Thread R. Michael Weylandt
My first thought is to unlist them and stick them in a vector and then to form that vector into an array of the desired shape. Something like this: x <- vector("list",12) for(i in 6*(1:12)){x[[i/6]] <- matrix(i:(i+5), ncol = 2) } print(x) x.out <- array(unlist(x), dim = c(2,3,12)) print(x.out)