[R] multiple "next" in for loops?

From: remko duursma <remkoduursma_at_hotmail.com>
Date: Wed, 12 Nov 2008 01:16:52 +0000

Dear R list,

I was wondering if there is an easy fix to this problem (there are workarounds, as always):

Within a for loop, we can use "next" to skip to the next index, but how can we skip the next n indices?

So, I would like something that looks like;

for(i in 1:10){



Is there a way?


(sorry for potential double posting, last version was HTML I think)


R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Wed 12 Nov 2008 - 01:20:03 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Wed 12 Nov 2008 - 03:30:23 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive