title: Wrong data type conversion after melt
body: <p>I get a <code>numeric</code> to <code>integer64</code> type conversion after melting a <code>data.table</code> object in R.</p>
  
  <p>Given the file <code>stats.txt</code>, tab separated:</p>
  
  <pre><code>id  x             y
  A   283726709252  0.1
  B   288604342155  0.2
  C   329048184196  0.3
  D   192107948937  0.4
  </code></pre>
  
  <p>I want to read it into a <code>data.table</code> and <em>melt</em> it. So:</p>
  
  <pre><code>library(data.table)
  stats&lt;- fread('stats.txt')
  
   stats
     id            x   y
  1:  A 283726709252 0.1
  2:  B 288604342155 0.2
  3:  C 329048184196 0.3
  4:  D 192107948937 0.4
  
  str(stats)
  Classes ‘data.table’ and 'data.frame':  4 obs. of  3 variables:
   $ id: chr  "A" "B" "C" "D"
   $ x :integer64 283726709252 288604342155 329048184196 192107948937 
   $ y : num  0.1 0.2 0.3 0.4
   - attr(*, ".internal.selfref")=&lt;externalptr&gt;
  </code></pre>
  
  <p>So far so good. Now if I melt it, I get the <em>y</em> variable converted from numeric to integer64:</p>
  
  <pre><code>xm&lt;- melt.data.table(data= stats, id.vars= 'id')
  
  xm
     id variable               value
  1:  A        x        283726709252
  2:  B        x        288604342155
  3:  C        x        329048184196
  4:  D        x        192107948937
  5:  A        y 4591870180066957722
  6:  B        y 4596373779694328218
  7:  C        y 4599075939470750515
  8:  D        y 4600877379321698714
  
  str(xm)
  Classes ‘data.table’ and 'data.frame':  8 obs. of  3 variables:
   $ id      : chr  "A" "B" "C" "D" ...
   $ variable: Factor w/ 2 levels "x","y": 1 1 1 1 2 2 2 2
   $ value   :integer64 283726709252 288604342155 329048184196 192107948937 4591870180066957722 4596373779694328218 4599075939470750515 4600877379321698714 
   - attr(*, ".internal.selfref")=&lt;externalptr&gt; 
  </code></pre>
  
  <p>Is this a bug or am I doing something wrong?</p>
  
  <pre><code>sessionInfo()
  R version 3.4.1 (2017-06-30)
  Platform: x86_64-apple-darwin15.6.0 (64-bit)
  Running under: macOS Sierra 10.12.6
  
  Matrix products: default
  BLAS: /Library/Frameworks/R.framework/Versions/3.4/Resources/lib/libRblas.0.dylib
  LAPACK: /Library/Frameworks/R.framework/Versions/3.4/Resources/lib/libRlapack.dylib
  
  locale:
  [1] en_GB.UTF-8/en_GB.UTF-8/en_GB.UTF-8/C/en_GB.UTF-8/en_GB.UTF-8
  
  attached base packages:
  [1] stats     graphics  grDevices utils     datasets  methods   base     
  
  other attached packages:
  [1] ggplot2_2.2.1       data.table_1.10.4-3
  
  loaded via a namespace (and not attached):
   [1] compiler_3.4.1   colorspace_1.3-2 scales_0.5.0     lazyeval_0.2.0   plyr_1.8.4       gtable_0.2.0     tibble_1.3.3     Rcpp_0.12.12     grid_3.4.1       rlang_0.1.1      munsell_0.4.3   
  </code></pre>