Re: [R] rbind, array

From: Gabor Grothendieck <ggrothendieck_at_gmail.com>
Date: Mon 17 Jul 2006 - 05:25:08 EST

Try this:

y <- array(1:27, c(3, 3, 3)) # test array rbind(y[,,1], y[,,2], y[,,3])
apply(y, 2, I)

# verify that last two lines give same result identical(apply(y, 2, I), rbind(y[,,1], y[,,2], y[,,3])) # TRUE

On 7/16/06, Robert Mcfadden <robert-mcfadden@o2.pl> wrote:
> Hello,
>
> I'm looping something like rbind for array. More precisely: if I define
>
> y<-array(c(1:27),dim=c(3,3,3)) and I take 3 matrix: y[,,1], y[,,2], y[,,3]
> and write rbind(y[,,1], y[,,2], y[,,3]) I get what I want. But what if I
> have hundreds such matrix. How to do it.
>
> Robert
>
>
>
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> 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
>



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 Received on Mon Jul 17 05:28:25 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Mon 17 Jul 2006 - 06:16:58 EST.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.