When you use fread with the option skip= the file is read skipping the first lines...
That's OK, but there is a small problem, the first line contains the header, and you end up having no column names in your data.table.
I solve the problem using fread twice. By first reading only the first line and saving its content, and later reading the file again skiping as desired, and the renaming the columns.
I think it would be a good idea if fread always read the first line and use it as column names in case you decided so and no matter the skip value.
When you use fread with the option skip= the file is read skipping the first lines...
That's OK, but there is a small problem, the first line contains the header, and you end up having no column names in your data.table.
I solve the problem using fread twice. By first reading only the first line and saving its content, and later reading the file again skiping as desired, and the renaming the columns.
I think it would be a good idea if fread always read the first line and use it as column names in case you decided so and no matter the skip value.