Wenn der Zustand erfüllt ist, überspringen Sie die nächste Iteration in a for Loop in R.

for(n in 1:5) {
  if(n==3) next # skip 3rd iteration and go to next iteration
  cat(n)
}
Trustworthy Whale