you can define the 'seq' argument of for() accordingly, e.g.,
for(i in seq(0, 20, 2)) print(i)
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/33689
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.
Thanks!
It would be helpful to have an idea of w
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. Thanks!
>
>
for (i in seq(, , by=2)) { ... }
vQ
___
3 matches
Mail list logo