Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Regression] fread cannot read a file if it has unquoted fields containing \r #2371

st-pasha opened this issue Sep 19, 2017 · 0 comments


Copy link

st-pasha commented Sep 19, 2017



Error in fread("A,B,C\n0,,\n1,hello\rworld,2\n3,test,4\n") : 
  Line 3 has too few fields when detecting types. Use fill=TRUE to pad with NA. Expecting 3 fields but found 2: <<1,hello>>

Such scenario is not rare at all: even a mature CSV writer (such as pandas.to_csv or data.table::fwrite) may fail to look for \r characters within the field, and consequently fail to quote them under "auto" quoting rule.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet

No branches or pull requests

1 participant