[R] How to combine two matrix or vectors

R. Michael Weylandt michael.weylandt at gmail.com
Fri Feb 10 16:06:05 CET 2012


How could you combine a and b as given to get your "new one"? It
doesn't have the same elements...

?union
?intersect
?rbind
?c

Michael

On Fri, Feb 10, 2012 at 9:55 AM, summer <summerwindwrx at hotmail.com> wrote:
> such as a=[1,2,3 ],b =[2,4] I want to get a new one [1 2 3 4 5]. Thank you.
>
> --
> View this message in context: http://r.789695.n4.nabble.com/How-to-combine-two-matrix-or-vectors-tp4376467p4376467.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