Skip to content

fread heuristic predicts wrong column count on a valid file #2196

@st-pasha

Description

@st-pasha

Minimally reproducible example:

fread('1,2,"3,a"\n4,5,"6,b"', verbose=T)

produces parsing log

Detecting sep ...
  sep==','(ascii 44)  with 2 lines of 3 fields using quote rule 0
  sep==','(ascii 44)  with 2 lines of 4 fields using quote rule 3
Detected 4 columns on line 1. This line is either column names or first data row (first 30 chars): <<1,2,"3,a">>

and the output dataset:

   V1 V2 V3 V4
1:  1  2 "3 a"
2:  4  5 "6 b"

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions