 in this example) after which point it stops.</p>
<p>To reinforce how <code>for</code> loops work and introduce you to a valuable feature of loops, we’ll alter our counter within the loop. This can be used, for example, if we’re using a loop to iterate through a vector but want to select the next row (or any other value). To show this we’ll simply add 1 to the value of our index every time we iterate our loop.</p>
<div class="sourceCode" id="cb399"><pre class="sourceCode r"><code class="sourceCode r">