title: Transform a set of columns in a data.table
body: <p>A <code>data.table</code> novice question.
  I would like to transform a set of columns in a <code>data.table</code> by applying a mathematical formula to them. The set of columns must exclude 1 or more of the total number of columns.</p>
  
  <p>In <code>data.frame</code> terms I would do:</p>
  
  <pre><code>data(iris)
  head(iris)
    Sepal.Length Sepal.Width Petal.Length Petal.Width Species
  1          5.1         3.5          1.4         0.2  setosa
  2          4.9         3.0          1.4         0.2  setosa
  3          4.7         3.2          1.3         0.2  setosa
  4          4.6         3.1          1.5         0.2  setosa
  5          5.0         3.6          1.4         0.2  setosa
  6          5.4         3.9          1.7         0.4  setosa
  
  iris[, -5] &lt;- iris[, -5] * 1e3
  head(iris)
    Sepal.Length Sepal.Width Petal.Length Petal.Width Species
  1         5100        3500         1400         200  setosa
  2         4900        3000         1400         200  setosa
  3         4700        3200         1300         200  setosa
  4         4600        3100         1500         200  setosa
  5         5000        3600         1400         200  setosa
  6         5400        3900         1700         400  setosa
  </code></pre>
  
  <p>I know how to select <a href="https://stackoverflow.com/questions/13383840/select-multiple-columns-in-data-table-r" title="SO">multiple columns</a> in a <code>data.table</code>:</p>
  
  <pre><code>iris.dt &lt;- data.table(iris)
  head(iris.dt[, -5, with = FALSE])
  </code></pre>
  
  <p>or even:</p>
  
  <pre><code>head(iris.dt[, !"Species", with = FALSE])
  </code></pre>
  
  <p>How to actually transform those selected columns taking advantage of <code>data.table</code> pass-by-reference?</p>