can anyone explain me why this works like it works... It seems to be a problem with big numbers I think. Is there a way to fix it without casting the id column to character?
library(data.table)
data <- data.table(id = c(11111111111111, 11111111111112))
data[id == 11111111111111]
data[as.numeric(id) == 11111111111111]
data[, .N, by = id]
data[, .N, by = as.numeric(id)]
data[, .N, by = as.character(id)]
Thank you for any help!