from the top of my head (ugly but works). jumps 5 if i==2 or i==8 j = 0 for(i in 1:15){ if((i==2)||(i==8)){ print(i) j=i+5 next } if (i>=j){ print(i) }else{ next } }