Skip to content

fread skip doesn't get the header names. #2080

@juanpide

Description

@juanpide

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions