[R] incrementing for loop by 2
marc_schwartz at comcast.net
Thu Jul 24 16:07:45 CEST 2008
on 07/24/2008 07:59 AM Clark, Jennifer H wrote:
> Dear List-serv members: How can I structure a for loop so that it
> will increment the counter by two using R? I am just looking for a
> simple example that shows where the incrementing part should go.
It would be helpful to have an idea of what you are trying to
accomplish, as there may very well be a better way than using a 'for' loop.
That being said:
> for (i in seq(0, 10, 2)) print(i)
More information about the R-help