[R] Duplicate elements of a vector

syrvn mentor_ at gmx.net
Thu Oct 6 20:58:27 CEST 2011


Hi,

let's assume I have the following vector a:

1 5 23

How can I use R to duplicate the elements so that my new vector looks like:

1 1 5 5 23 23


Many thanks,
Syrvn

--
View this message in context: http://r.789695.n4.nabble.com/Duplicate-elements-of-a-vector-tp3879561p3879561.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list