[R] creating list of the from 1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4, . . ., n, n, n?

jim holtman jholtman at gmail.com
Fri Aug 14 16:49:24 CEST 2009


> rep(1:4, each=3)
 [1] 1 1 1 2 2 2 3 3 3 4 4 4


On Fri, Aug 14, 2009 at 10:44 AM, John
Sorkin<jsorkin at grecc.umaryland.edu> 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?
> Thanks
> John
>
> John David Sorkin M.D., Ph.D.
> Chief, Biostatistics and Informatics
> University of Maryland School of Medicine Division of Gerontology
> Baltimore VA Medical Center
> 10 North Greene Street
> GRECC (BT/18/GR)
> Baltimore, MD 21201-1524
> (Phone) 410-605-7119
> (Fax) 410-605-7913 (Please call phone number above prior to faxing)
>
> Confidentiality Statement:
> This email message, including any attachments, is for ...{{dropped:19}}




More information about the R-help mailing list