[R] Help with rep
    Dimitris Rizopoulos 
    dimitris.rizopoulos at med.kuleuven.be
       
    Fri Jul 25 11:22:10 CEST 2008
    
    
  
try this:
st <- 5
unlist(lapply(st:1, seq, to = st))
I hope it helps.
Best,
Dimitris
----
Dimitris Rizopoulos
Biostatistical Centre
School of Public Health
Catholic University of Leuven
Address: Kapucijnenvoer 35, Leuven, Belgium
Tel: +32/(0)16/336899
Fax: +32/(0)16/337015
Web: http://med.kuleuven.be/biostat/
     http://perswww.kuleuven.be/dimitris_rizopoulos/
----- Original Message ----- 
From: "Van Wyk, Jaap" <jaapvw at uj.ac.za>
To: <r-help at r-project.org>
Sent: Friday, July 25, 2008 11:07 AM
Subject: [R] Help with rep
> Hi
> Is it possible to use the rep command (or maybe some other 
> "shortcut") to create a vector with the following format:
> 4  3  4  2  3  4  1  2  3  4
>
> Any help is much appreciated.
> Thanks
> Jacob
>
>
> Jacob L van Wyk
> Department of Statistics
> University of Johannesburg, APK
> Box 524
> Auckland Park 2006
> South Africa
> Office Tel: +27 11 559 3080
> Fax: +27 11 559 2832
>
>
> [[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.
> 
Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm
    
    
More information about the R-help
mailing list