[R] Quick question about duplicating vectors

From: Xiaoxi Gao <rhelpme_at_hotmail.com>
Date: Sun, 03 Apr 2011 18:04:39 -0400

Hello R users,

I have a quick question, if I have a data set a, say a <- c(1,2,3,4,5)
and I want to get a new data set b,
b <- c(1,1,1,2,2,2,3,3,3,4,4,4,5,5,5)

Could anyone tell me how I can obtain this?

Thank you!

Xiaoxi                                                

        [[alternative HTML version deleted]]



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. Received on Sun 03 Apr 2011 - 22:07:21 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Sun 03 Apr 2011 - 22:40:28 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive