"op">+</span><span class="st">   </span><span class="co"># Count the number of errors</span></span>
<span id="cb10-13"><a href="#cb10-13" aria-hidden="true"></a><span class="op">+</span><span class="st">   </span>qual &lt;-<span class="st"> </span>res[, .(<span class="dt">errors =</span> <span class="kw">length</span>(<span class="kw">unique</span>(official_name))<span class="op">-</span><span class="dv">1</span>, <span class="dt">n =</span> .N), by =<span class="st"> </span>group]</span>
<span id="cb10-14"