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

read_table2: warnings with comments char #908

dkulp2 opened this issue Nov 6, 2018 · 1 comment

read_table2: warnings with comments char #908

dkulp2 opened this issue Nov 6, 2018 · 1 comment


Copy link

@dkulp2 dkulp2 commented Nov 6, 2018

What's all this fuss about. I can't decipher the warnings that are printed, but clearly the parser is not silently ignoring characters after the comment character, like the documentation says.

Is this a bug or user error? (read.table deals with this correctly without objection.)

> s <- "# ignore\nA B # comment\nC  D  #another comment\n#ignore this too"
> cat(s)
# ignore
A B # comment
C  D  #another comment
#ignore this too
> readr::read_table2(s, comment = '#', col_names=c('C1','C2'))
Warning: 3 parsing failures.
row # A tibble: 3 x 5 col     row col   expected  actual    file         expected   <int> <chr> <chr>     <chr>     <chr>        actual 1     1 NA    2 columns 4 columns literal data file 2     2 NA    2 columns 4 columns literal data row 3     3 NA    2 columns 1 columns literal data

# A tibble: 3 x 2
  C1    C2   
  <chr> <chr>
1 A     B    
2 C     D    
3 NA    NA   
Warning message:
In rbind(names(probs), probs_f) :
  number of columns of result is not a multiple of vector length (arg 1)
@jimhester jimhester added the bug label Nov 13, 2018
@jimhester jimhester closed this in 3215e84 Nov 14, 2018
Copy link

@lock lock bot commented May 13, 2019

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.

@lock lock bot locked and limited conversation to collaborators May 13, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants