[datatable-help] Filter rows using integer64 columns
tjonesd289
t.jonesd289 at gmail.com
Wed Oct 14 20:46:54 CEST 2015
I have loaded data from file. The resulting data.table looks like this:
> require(data.table)
>require(bit64)
> z = fread('mydata.csv')
> print(z)
a
1: -688037432807398365
2: 8910419692287774511
3: 7392641969610778497
4: -7275864368241016399
5: 5280275646239497580
> class(z$a)
"integer64"
However, I cannot filter z on column a...
> z[a == -688037432807398365,]
Empty data.table (0 rows) of 1 cols: a
Similarly,
> z[a == as.integer64(-688037432807398365),]
Error in UseMethod("as.data.table") :
no applicable method for 'as.data.table' applied to an object of class
"integer64"
I also noticed that as.integer64 rounds the input (see last 3 digits)....
> as.integer64(-688037432807398365)
integer64
[1] -688037432807398400
Any ideas how to filter rows using integer64 columns? I suppose I could
convert to character first, but then what is the point of even having
integer64?
datatable is version 1.9.4, bit64 is version 0.9-5
Thanks!
--
View this message in context: http://r.789695.n4.nabble.com/Filter-rows-using-integer64-columns-tp4713594.html
Sent from the datatable-help mailing list archive at Nabble.com.
More information about the datatable-help
mailing list