-
Notifications
You must be signed in to change notification settings - Fork 286
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
read_csv blank lines #680
Comments
I ran into this problem today. Very annoying behavior. read.csv has blank.lines.skip parameter. read_csv should have something similar. |
If you know the number of blank / comment lines use the |
Closed by 6517708 |
I still cannot get it -- why is it so difficult to skip over blank lines. What am I missing? --Leo |
This old issue has been automatically locked. If you believe you have found a related problem, please file a new issue (with reprex) and link to this issue. https://reprex.tidyverse.org/ |
If there are blank lines before a header, the header is recognized as such but also included as a row. I came across this in read_tsv, but the min example was easier in read_csv.
e.g.
read_csv("\n\nfileName,variableName,fileDescription\nmy.tsv,awesomeStuff,that awesome stuff i made")
# A tibble: 2 × 3
fileName variableName fileDescription
<chr> <chr> <chr>
1 fileName variableName fileDescription
2 my.tsv awesomeStuff that awesome stuff i made
It may not be an additional problem, but in my case I'm also using comments:
read_csv("# this is a comment\n\nfileName,variableName,fileDescription\nmy.tsv,awesomeStuff,that awesome stuff i made", comment="#")
The text was updated successfully, but these errors were encountered: