n class="st"> </span>thresholds &lt;-<span class="st"> </span>pairs[, .(<span class="dt">ftrue =</span> <span class="kw">mean</span>(true)), by =<span class="st"> </span>threshold]</span>
<span id="cb6-3"><a href="#cb6-3" aria-hidden="true"></a><span class="op">&gt;</span><span class="st"> </span><span class="kw">print</span>(thresholds[<span class="kw">order</span>(ftrue)])</span>
<span id="cb6-4"><a href="#cb6-4" aria-hidden="true"></a>  Total number of pairs<span class="op">:</span><span class="st"> </sp