Message-ID: <Pine.LNX.3.96.991221100117.8747V-100000@penguin.fws.gov>
Date: 1999-12-21T15:02:50Z
From: royle@penguin.irm.r9.fws.gov
Subject: generating a sequence
In-Reply-To: <12293E36886@gecko.biol.wits.ac.za>
Funny I had this same problem last week. Use the function "sequence"
like:
sequence(4:1)
[1] 1 2 3 4 1 2 3 1 2 1
kind regards
andy
---------------------------------------------------------------------
J. Andy Royle, U.S. Fish and Wildlife Service - Office of Migratory
Bird Management; 11510 American Holly Drive , Laurel, MD 20708-4017;
phone - 301-497-5673 fax - 301-497-5706 email - royle at penguin.fws.gov
---------------------------------------------------------------------
On Tue, 21 Dec 1999, KAREN KOTSCHY wrote:
> Hi everyone
>
> I'm trying to generate a vector of the form
> a <- c(1,2,3,4,1,2,3,1,2,1) where n = 5
> in a general way, where n can be any positive integer.
>
> I've run out of ideas. Does anyone have any suggestions?
>
> Thanks
> Karen
> Karen Kotschy
> Centre for Water in the Environment
> University of the Witwatersrand
> Johannesburg
>
> Tel: 011 716-2218
> -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
> r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
> Send "info", "help", or "[un]subscribe"
> (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch
> _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
>
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._