on</span></span></span>
<span class="r-in"><span><span class="va">r2_manual</span> <span class="op">&lt;-</span> <span class="fu"><a href="https://rdrr.io/r/base/sum.html" class="external-link">sum</a></span><span class="op">(</span><span class="va">s2</span><span class="op">$</span><span class="va">solution_1</span> <span class="op">*</span> <span class="va">sim_pu_polygons</span><span class="op">$</span><span class="va">cost</span>, na.rm <span class="op">=</span> <span class="cn">TRUE</span><span class="