Fread should read at least several first lines to verify that newlines are consistent.
In issue #1967 there was a report about a file where first line ended with \r\n, while the rest of the file had standard Unix line endings \n. As a result, fread thought that it's a file with several million columns, which does not end well...
Having such a file is possible if for example users concatenates file with headers and file with data and the two files have different line endings (in fact it is even conceivable for a user to concatenate several data files with different line endings).
Fread should read at least several first lines to verify that newlines are consistent.
In issue #1967 there was a report about a file where first line ended with
\r\n, while the rest of the file had standard Unix line endings\n. As a result,freadthought that it's a file with several million columns, which does not end well...Having such a file is possible if for example users concatenates file with headers and file with data and the two files have different line endings (in fact it is even conceivable for a user to concatenate several data files with different line endings).