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" <[EMAIL PROTECTED]>
To: <r-help@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@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
______________________________________________
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.