title: Initialize R data.table with column name from string
body: <p>I want to do something like this:</p>
  
  <pre><code>&gt; colname &lt;- "a"
  &gt; dt &lt;- data.table(colname = c(1,2,3,4))
     a
  1: 1
  2: 2
  3: 3
  4: 4
  </code></pre>
  
  <p>But instead, I get this:</p>
  
  <pre><code>&gt; colname &lt;- "a"
  &gt; dt &lt;- data.table(colname = c(1,2,3,4))
     colname
  1:       1
  2:       2
  3:       3
  4:       4
  </code></pre>
  
  <p>Is there a good way around this besides creating the <code>data.table</code> and assigning the names afterward?</p>