Hi,

On Aug 14, 2009, at 10:44 AM, John Sorkin wrote:

Windows XP
R 2.8.1

Is there any way to make a list of the from
1,1,1,2,2,2,3,3,3,4,4,4, . . ., n,n,n?

Like so?

R> rep(1:10, each=3)
[1] 1 1 1 2 2 2 3 3 3 4 4 4 5 5 5 6 6 6 7 7 7 8 8 8 9
[26]  9  9 10 10 10

-steve

--
Steve Lianoglou
Graduate Student: Computational Systems Biology
  |  Memorial Sloan-Kettering Cancer Center
  |  Weill Medical College of Cornell University
Contact Info: http://cbio.mskcc.org/~lianos/contact

______________________________________________
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.

Reply via email to