 can, use the apply version. There’s nothing worse than realising there was a small, tiny, seemingly meaningless mistake in a loop which weeks, months or years down the line has propagated into a huge mess. We strongly recommend trying to use the apply functions whenever possible.</p>
<div id="lapply" class="section level4 unnumbered hasAnchor">
<h4>lapply<a href="loops.html#lapply" class="anchor-section" aria-label="Anchor link to header"></a></h4>
<p>Your go to apply function will often be <code>lapply(