[R] Array Making

Stavros Macrakis macrakis at alum.mit.edu
Mon Dec 29 19:24:46 CET 2008


How about

   c(rbind(A,B,C))

a<-1:5
> b<-11:15
> c<-21:25
> rbind(a,b,c)
  [,1] [,2] [,3] [,4] [,5]
a    1    2    3    4    5
b   11   12   13   14   15
c   21   22   23   24   25
> c(rbind(a,b,c))
 [1]  1 11 21  2 12 22  3 13 23  4 14 24  5 15 25


On Mon, Dec 29, 2008 at 4:01 AM, ykank <spicyankit4u at gmail.com> wrote:
>
> Dear R Users
>
> Suppose I've certain values of A[1], A[2], A[3]
> ,A[4].....B[1],B[2],B[3]..C[1],C[2],C[3].....so on..All A,B,Cs are some
> numeric constant.
>
> I want to make an array which will look like [A[1], B[1], C[1], A[2], B[2],
> C[2], A[3], B[3] ,C[3]............
>
> Please suggest me any way to do it.I would be deeply grateful.
>
> Ankit Kumar Gupta
> B.Tech. 3rd Yr
> IIT Roorkee
> India
> --
> View this message in context: http://www.nabble.com/Array-Making-tp21200465p21200465.html
> Sent from the R help mailing list archive at Nabble.com.
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>



More information about the R-help mailing list