[R] How to convert array to c()

Muhammad Subianto subianto at gmail.com
Wed May 18 16:18:13 CEST 2005


Dear R-helper,

Is there possible to make this array:
 > a <- array(1:12, c(4, 3))
 > a
      [,1] [,2] [,3]
[1,]    1    5    9
[2,]    2    6   10
[3,]    3    7   11
[4,]    4    8   12
 >

like:
c(1,5,9)
c(2,6,10)
c(3,7,11)
c(4,8,12)

Thank you very much in advance.
Regards,
Muhammad Subianto




More information about the R-help mailing list