the same time, we would also like to add the column <code>speed</code> to <em>flights</em>. We could write a simple function as follows:</p>
<div class="sourceCode" id="cb16"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb16-1"><a href="#cb16-1" aria-hidden="true"></a>foo &lt;-<span class="st"> </span><span class="cf">function</span>(DT) {</span>
<span id="cb16-2"><a href="#cb16-2" aria-hidden="true"></a>  DT[, speed <span class="op">:</span><span class="er">=</span><span class="st"> </spa