Skip to content
Prev 295587 / 398503 Next

Collecting results of a test with array

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)

which I believe is what you want. [If not, I think it will at least
get you started]

Hope this helps,

Michael
On Fri, May 25, 2012 at 5:21 AM, Francesca <francesca.pancotto at gmail.com> wrote: