Skip to content

fread should distinguish between quoted and unquoted empty strings #2217

@st-pasha

Description

@st-pasha

See #2214

For a file like this:

A,B
1,"foo"
2,
3,""

the B column should be understood as c("foo", NA, ""), not c("foo", "", "") or c("foo", NA, NA).

The proposed mechanism is the following: make 2 "string" types. The first type (default) reads empty fields as empty strings. However this type fails to recognize field "" as valid input and instead type-bumps. The second type treats empty field as NA and "" as an empty string.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions