span>
<span><span class="va">ord</span> <span class="op">&lt;-</span> <span class="fu"><a href="https://rdrr.io/r/base/order.html" class="external-link">order</a></span><span class="op">(</span><span class="va">knn_dist</span>, decreasing<span class="op">=</span><span class="cn">TRUE</span><span class="op">)</span></span>
<span><span class="va">ord</span><span class="op">[</span><span class="fl">1</span><span class="op">:</span><span class="fl">4</span><span class="op">]</span></span>
<span><span class="co"