[R] incrementing for loop by 2

Wacek Kusnierczyk Waclaw.Marcin.Kusnierczyk at idi.ntnu.no
Thu Jul 24 16:14:36 CEST 2008


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(<start>, <end>, by=2)) { ... }

vQ



More information about the R-help mailing list