-
Notifications
You must be signed in to change notification settings - Fork 1k
Closed
Description
Related to #488.
require(data.table)
require(bit64)
dt1 <- data.table(x = c(1),y = integer64(1))
dt2 <- data.table(x = c(1,2))
setkey(dt1,x)
setkey(dt2,x)
merge(dt1,dt2,all=TRUE)
# x y
#1: 1 0
#2: 2 9218868437227407266can reach the desired result by the workaround
dt <- merge(dt1,dt2,all=TRUE)
dt[as.character(y)== "9218868437227407266", y := as.integer64(NA)]
dt
# x y
#1: 1 0
#2: 2 NAthere is a note about what may be causing this behavior in the bit64 reference
Subscripting non-existing elements and subscripting with NAs is currently not supported. Such subscripting currently returns 9218868437227407266 instead of NA (the NA value of the underlying double code). Following the full R behaviour here would either destroy performance or require extensive C-coding.
Reactions are currently unavailable