><a href="loops.html#cb409-16" tabindex="-1"></a><span class="do">## [1] 5</span></span></code></pre></div>
<p>The <code>sapply()</code> function does the same thing as <code>lapply()</code> but instead of storing the results as a list, it stores them as a vector.</p>
<div class="sourceCode" id="cb410"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb410-1"><a href="loops.html#cb410-1" tabindex="-1"></a><span class="fu">sapply</span>(<span class="dv">0</span><span class="sc">:</span><span cl