Werner Wernersen <pensterfuzzer <at> yahoo.de> writes:

> 
> Hi,
> 
> this is probably the easiest thing to do but I manage
> not finding the answer:
> I have a list with matrices of exact same format and
> headers. Now I would like to transform the list into
> an normal array. What is the proper way to do this?

  I think if you really mean array (i.e. an n-dimensional
table with n>2) then something like the following will do it:

## create an example list of matrices
z <- replicate(5,matrix(runif(9),nrow=3),simplify=FALSE)
library(abind)
do.call("abind",c(z,list(along=3)))

  Ben Bolker

______________________________________________
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Reply via email to