="fu"><a href="https://rspatial.github.io/terra/reference/dimensions.html" class="external-link">ncell</a></span><span class="op">(</span><span class="va">r</span><span class="op">)</span></span></span>
<span class="r-in"><span><span class="va">r2</span> <span class="op">&lt;-</span> <span class="fu">mosaic_aggregate</span><span class="op">(</span><span class="va">r</span>, pct <span class="op">=</span> <span class="fl">10</span><span class="op">)</span></span></span>
<span class="r-in"><span><span class="v