It appears that if the second line in the file is empty, the column names will not be read. I played with switches such as header, skipped from the documentation, but can't make it work.
If the second line in my file is empty, how to ignore this fact and still read the first line as column names?
second line is empty:
> fread('c1 c2\n\n1 2\n3 4\n') V1 V2 1: 1 2 2: 3 4
second line is not empty:
> fread('c1 c2\n1 2\n3 4\n') c1 c2 1: 1 2 2: 3 4
source share