Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

data.table fread function

Tags:

r

csv

data.table

I am using the new data.table:::fread function (fastest read function I've used in R so far) and I got the following (self explanatory) exception:

R) fread(path)
Erreur dans fread(path) : Coercing integer64 to real needs to be implemented

My file (which is a csv separated by tabs) indeed holds big integers like 902160000671352000. My question is then, can I tell fread to #NOT# read the second columns (where those monsters int are)

like image 719
statquant Avatar asked Jan 02 '13 15:01

statquant


1 Answers

Good question. Not yet, but yes you will be able to. Agree with all comments.

The TO DO list is at the top of the readfile.c source. If there's anything missing please let me know. That list covers allowing type overrides, implementing the unimplemented coercions and allowing columns to be skipped. Hopefully will all be done for first release in 1.9.0.

fread is currently in v1.8.7 which is in development on R-Forge. When finished it'll be released as 1.9.0 to CRAN. The .0 indicates that new features might possibly change argument names and behaviour; i.e., don't be surprised if backwards incompatabile changes are made to fread in 1.9.1. Given its nature it's hard to imagine anything major will change, though. But that's why I publicised its availability on R-Forge, to get it into the wild early and get things like this right.

like image 146
Matt Dowle Avatar answered Oct 07 '22 01:10

Matt Dowle