我在使用data.table
and integer64
(package bit64
)> 时遇到了很多困难,我的理解是,integer64
它还不能在by
子句中使用。虽然我可能在“ sort
”中发现了一个错误。
library(data.table)
library(bit64)
test4 <- structure(list(IDFD = c("360627720722618433", "360627720722618433"
), CDVCA = c("2013-03-13T09:36:07.795", "2013-03-13T09:36:07.795"
), NUMSEQ = structure(c(1.05397451390436e-309, 1.05397443975625e-309
), class = "integer64")), .Names = c("IDFD", "CDVCA", "NUMSEQ"
), row.names = c(NA, -2L), class = "data.frame")
str(test4)
'data.frame': 2 obs. of 3 variables:
$ IDFD : chr "360627720722618433" "360627720722618433"
$ CDVCA : chr "2013-03-13T09:36:07.795" "2013-03-13T09:36:07.795"
$ NUMSEQ:Class 'integer64' num [1:2] 1.05e-309 1.05e-309
test4 <- as.data.table(test4)
str(test4)
Classes ‘data.table’ and 'data.frame': 2 obs. of 3 variables:
$ IDFD : chr "360627720722618433" "360627720722618433"
$ CDVCA : chr "2013-03-13T09:36:07.795" "2013-03-13T09:36:07.795"
$ NUMSEQ:Class 'integer64' num [1:2] 1.05e-309 1.05e-309
- attr(*, ".internal.selfref")=<externalptr>
setkey(test4,IDFD,CDVCA,NUMSEQ)
test4
IDFD CDVCA NUMSEQ
1: 360627720722618433 2013-03-13T09:36:07.795 213326816542720
2: 360627720722618433 2013-03-13T09:36:07.795 213326801534975 #THIS IS NOT SORTED !!
我对吗 ?