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

fread warning on "stopped reading" should interact with nrows #1671

Closed
MichaelChirico opened this issue Apr 24, 2016 · 0 comments · Fixed by #2623
Closed

fread warning on "stopped reading" should interact with nrows #1671

MichaelChirico opened this issue Apr 24, 2016 · 0 comments · Fixed by #2623
Milestone

Comments

@MichaelChirico
Copy link
Member

MichaelChirico commented Apr 24, 2016

I'm reading a file that has some sort of metadata printed below the main data; fread smartly skips reading this but produces a warning:

Warning message:
In fread(...) :
Stopped reading at empty line 201268 but text exists afterwards (discarded): (201266 row(s) affected)

Trying to minimize the warnings my code produces, I tried to manually set nrows so that fread ends before finding this little oddity, but I get the same warning.

Reproducible version:

fread("col1, col2, col3
1, 2, 3
3, 5, 6
7, 8, 9

some text to ignore", nrows = 4L)

Outputs:

#    col1 col2 col3
#1:    1    2    3
#2:    3    5    6
#3:    7    8    9

Warning message:
In fread("col1, col2, col3\n1, 2, 3\n3, 5, 6\n7, 8, 9\n\nsome text to ignore", :
Stopped reading at empty line 5 but text exists afterwards (discarded): some text to ignore

The warning is surprising since we told fread to read 4 rows and it's still worried about things happening in rows 5 and beyond.

@st-pasha st-pasha added the bug label Jul 6, 2017
@mattdowle mattdowle added this to the v1.10.6 milestone Feb 13, 2018
mattdowle added a commit that referenced this issue Feb 13, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants