On 4/5/06, Ben Bolker <[EMAIL PROTECTED]> wrote:
> 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)))

Note that if that is what he is looking for then

abind(z, along = 3)

will do it too.

______________________________________________
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