Everyone,
I'm very new to R, especially when it comes to loops and functions, so
please bear with me if this is an elementary question. I cannot seem to
figure out how to construct a loop which runs a function until a certain
value is computed. For example, say I have the following:
num =
Jones [mailto:jo...@reed.edu]
Sent: Tuesday, April 10, 2012 11:46 AM
To: Steve Lavrenz
Cc: r-help@r-project.org
Subject: Re: [R] Creating a loop with an indefinite end term
Here are a couple of constructions that work.
albyn
===
num - rep(0,10)
for (i in 2
From: Jean V Adams [mailto:jvad...@usgs.gov]
Sent: Tuesday, April 10, 2012 12:38 PM
To: Steve Lavrenz
Cc: r-help@r-project.org
Subject: Re: [R] Creating a loop with an indefinite end term
Do you need a loop at all?
Will this do the trick?
seq(from=0, to=100, by=5)
Jean
Steve Lavrenz
3 matches
Mail list logo