Try this also:

 ab <- do.call("cbind", list(a, b))[,c(1,4,2,5,3,6)]


On 11/10/2007, Martin Ivanov <tramni@abv.bg> wrote:
>
> Dear R users,
> I need to to the the following. Let a= 1 2 3
>                                         4 5 6
> and b= -1 -2 -3  be (2x3) matrices.
>        -4 -5 -6
> I need to combine the two matrices into a new (2x6) matrix like this:
>
> ab = ( 1 -1 2 -2 3 -3 )
>        4 -4 5 -5 6 -6
>
> How can this be done in R?
>
>
>
> -----------------------------------------------------------------
> 妞把忘抄扶忘 扯快抖 - 坏忘 抉扯快抖快快扮! www.survivor.btv.bg
>
> ______________________________________________
> R-help@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.
>



-- 
Henrique Dallazuanna
Curitiba-Paran芍-Brasil
25～ 25' 40" S 49～ 16' 22" O

	[[alternative HTML version deleted]]

