Data.table: fread incorrectly skips header on this file

Created on 5 Apr 2016  路  1Comment  路  Source: Rdatatable/data.table

fread("http://www.nzta.govt.nz/resources/crash-analysis-system-data/docs/crash-data-2014.csv") :
Starting data input on line 2 and discarding line 1 because it has too few or too many items to be column names or data: "TLA NAME","CRASH ROAD","CRASH DIST","CRASH DIRN","INTSN","SIDE ROAD","CRASH ID","CRASH DATE","CRASH DOW","CRASH TIME","MVMT","VEHICLES","CAUSES","OBJECTS STRUCK","ROAD CURVE","ROAD WET","LIGHT","WTHRa","JUNC TYPE","TRAF CTRL","ROAD MARK","SPD LIM","CRASH FATAL CNT","CRASH SEV CNT","CRASH MIN CNT","PERS AGE1","PERS AGE2","EASTING","NORTHING"

From : http://stackoverflow.com/questions/28100868/download-file-inserts-an-extra-cr-after-each-crlf

bug fread

Most helpful comment

Try it again with fill = TRUE.

Perhaps that should be added to the warning message. Or we should load length(header) number of columns by default, and provide the warning that informs about fill=TRUE.

Are you going to work on this? If not, I'd prefer it to be moved to v2.0.0.

>All comments

Try it again with fill = TRUE.

Perhaps that should be added to the warning message. Or we should load length(header) number of columns by default, and provide the warning that informs about fill=TRUE.

Are you going to work on this? If not, I'd prefer it to be moved to v2.0.0.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

nachti picture nachti  路  3Comments

DavidArenburg picture DavidArenburg  路  3Comments

franknarf1 picture franknarf1  路  3Comments

st-pasha picture st-pasha  路  3Comments

alex46015 picture alex46015  路  3Comments