[datatable-help] Use of int64 with fread

Matthew Dowle mdowle at mdowle.plus.com
Thu Apr 18 11:48:09 CEST 2013


What do you cast integer64 back to?  There is some support, you just 
can't have integer64 in keys for example yet. They can be useful and 
work as a value column don't they?  (I don't have much need for 
integer64 myself, so I don't necessarily know.)

I've added use.integer64 = TRUE as a global option and argument to 
fread (not yet committed). That's just a way to turn off the integer64 
feature basically, so they'll be read as numeric as read.csv does.

Btw, after some to and fro I'm thinking colClasses (when type character 
vector) would work the same as read.csv,  but if type list, then you 
could pass sets of columns by number or name; i.e., two valid ways to 
use colClasses in fread would be :

    colClasses = 
c(colC="character",colD="character",colE="character",colQ="numeric")   # 
as read.csv
or
    colClasses = list(character=3:6, numeric="colQ")

To drop columns use "NULL" in colClasses just as read.csv. To select 
columns, 'select' may be either character or numeric vector.

Sound ok?

Matthew


On 18.04.2013 10:28, statquant3 wrote:
> Hello,
> a quick question.
> Given that there is no support yet of int64 in data.table operations.
> Is it really a good thing to cast automatically int64. I find myself
> casting back int64 all the time...
>
> Cheers
>
>
>
> --
> View this message in context:
> http://r.789695.n4.nabble.com/Use-of-int64-with-fread-tp4664582.html
> Sent from the datatable-help mailing list archive at Nabble.com.
> _______________________________________________
> datatable-help mailing list
> datatable-help at lists.r-forge.r-project.org
> 
> https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/datatable-help


More information about the datatable-help mailing list