ures</span> <span class="op">&lt;-</span> <span class="va">sim_features</span></span></span>
<span class="r-in"><span><span class="va">thresholds</span> <span class="op">&lt;-</span> <span class="fu">terra</span><span class="fu">::</span><span class="fu"><a href="https://rspatial.github.io/terra/reference/global.html" class="external-link">global</a></span><span class="op">(</span></span></span>
<span class="r-in"><span>  <span class="va">sim_features</span>, fun <span class="op">=</span> <span class="va">q