Skip to content

melt drops the class of integer64 columns #993

@richierocks

Description

@richierocks

To reproduce, try:

DT <- data.table(x = as.integer64(10^(9:18)))
##                       x
##  1:          1000000000
##  2:         10000000000
##  3:        100000000000
##  4:       1000000000000
##  5:      10000000000000
##  6:     100000000000000
##  7:    1000000000000000
##  8:   10000000000000000
##  9:  100000000000000000
## 10: 1000000000000000000

melt(DT, measure.vars = "x")
##     variable         value
##  1:        x 4.940656e-315
##  2:        x 4.940656e-314
##  3:        x 4.940656e-313
##  4:        x 4.940656e-312
##  5:        x 4.940656e-311
##  6:        x 4.940656e-310
##  7:        x 4.940656e-309
##  8:        x 5.431165e-308
##  9:        x 5.620396e-302
## 10:        x 7.832953e-242

integer64 values are stored using numeric values. The numbers shown in the value column after melting are unclass(DT$x).

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions