title: R: How to decrease counter in for loop
body: <p>I would like to do 10 iterations, but sometimes flag is bigger that 1. In this case I must to decrease variable i by 1 and calculate flag again. How to do this decrement? </p>
  
  <pre><code>    for(i in (1:n)){ 
      flag &lt;- ... # some code
          if (flag &gt; 1) {
           # some code
          } 
          #else decrement i &lt;- i - 1 ??
      }
  </code></pre>
  
  <p>Thanks.</p>