[R] Merging vectors

Mago84 davidquiasmo at gmail.com
Fri Dec 30 18:19:31 CET 2011


Dear R addicts,

I´m trying to merge two vectors like these and I don´t want to use loops.

EV
 [1]   9  16  19  21  67  71  82  87 110 112 141 156 201 211 248 264 272 298
331
[20] 341 347 361 373 468 490 493 504 508 806 830 833 883 885 897 953 955

SV
 [1]   3  21  28  33 229 379 396 532 535 541 630 634 643 645 647 654 656 677
680
[20] 685 687 718 727 735 738 746 748 751 766 768 903 926 936 995 999

I need to obtain something like this:
9, 21, 21, 28, 67, 229, 248, 379..

Taking one by one of each vector in order. * EV is always the first one*.

I have never use the function merge, I tried to look for a piece of
information, but I´m not sure that it´s what I should use.

Could somebody help me?

Thanks a lot!

--
View this message in context: http://r.789695.n4.nabble.com/Merging-vectors-tp4246255p4246255.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list