title: Generating a new variable with get(data.table) directly after loading data.table object
body: <p>I am trying to generate a new variable in a data.table which I generated, saved and loaded again. After loading I adress the data.table indirectly through get() and this does not work for generating a new variable as long as I dont adress it directly for variable creation before.
  Possibly it is some kind of environment issue?</p>
  
  <pre><code># Generate data.table
  t&lt;-data.table(x=c(1,2,3,4))
  tStr&lt;-"t"
  names(t)
  
  # Generate Variable a -&gt; ok
  get(tStr)[, a:=1]
  names(t)
  
  # Generate Variable b -&gt; ok
  t[, b:=1]
  names(t)
  
  # Save
  save(t, file="test.Robj")
  load("test.Robj", .GlobalEnv)
  
  # Generate Variable c -&gt; fails 
  get(tStr)[, c:=1] 
  names(t)
  
  # Generate Variable d -&gt; ok
  t[, d:=1]
  names(t)
  
  # Generate Variable e -&gt; ok again !?
  get(tStr)[, e:=1]
  names(t)
  </code></pre>
  
  <p>Thanks for your help</p>