ars_dt</span><span class="op">[</span>, <span class="fu"><a href="https://rdrr.io/r/base/mean.html" class="external-link">mean</a></span><span class="op">(</span><span class="va">mpg</span><span class="op">)</span>, by <span class="op">=</span> <span class="va">am</span><span class="op">]</span>   </code></pre></div>
<pre><code><span class="co">##       am       V1</span>
<span class="co">##    &lt;num&gt;    &lt;num&gt;</span>
<span class="co">## 1:     1 24.39231</span>
<span class="co">## 2:     0 17.147