Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upInteger64 columns not assigned NA when doing a left merge #1459
Comments
|
I think this is a duplicate. |
|
Thanks for linking to the old issue @dlithio. Maybe we can fix it internally.. |
|
The same happens when library(data.table)
library(bit64)
rbindlist(list(
data.table(a=1:2, b=as.integer64(c(1,NA))),
data.table(a=3L)
), fill=TRUE)
# a b
#1: 1 1
#2: 2 NA
#3: 3 9218868437227407266 |
|
I'm not sure if I should create a new issue for this, but I am having this problem when using the := operator, but not when using merge.
Update: I guess this is the expected behaviour:
I have a lot of code using the := method, and I'm not sure if it's feasible to switch everything to use merge instead |
|
confirming problem for current dev
…On Tue, Oct 3, 2017 at 5:47 AM, andrewkho ***@***.***> wrote:
I'm not sure if I should create a new issue for this, but I am having this
problem when using the := operator, but not when using merge.
> packageVersion("data.table")
[1] ‘1.10.4’
> packageVersion("bit64")
[1] ‘0.9.7’
> dt1 <- data.table(id=c(1,2), x=bit64::as.integer64(100,200))
> dt2 <- data.table(id=c(1,3))
> dt1
id x
1: 1 100
2: 2 100
> dt2
id
1: 1
2: 3
> merge(dt1,dt2, all=T)
id x
1: 1 100
2: 2 100
3: 3 NA
> dt2[J(dt1), x := i.x, on=.(id)]
> dt2
id x
1: 1 100
2: 3 9218868437227407266
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#1459 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AHQQdRNN5xLwJ4C3TIc-jV5zJrfXo4RQks5soVoEgaJpZM4Gul8T>
.
|
Handle NA integer64 properly in:
Yields
This is with data.table 1.9.6.