You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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)
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/
Activity
lock commentedon 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. https://reprex.tidyverse.org/