Adding whitespace at the beginning of a file (or between the end of a list of comments and a header row) causes the header row to be duplicated in the data.
Compare:
No leading whitespace; gives expected result
> read_csv("foo,bar\n1,2")
# A tibble: 1 x 2
foo bar
<int> <int>
1 1 2
With leading whitespace; duplicates header row (and changes column types)
> read_csv("\nfoo,bar\n1,2")
# A tibble: 2 x 2
foo bar
<chr> <chr>
1 foo bar
2 1 2
readr is version 1.1.1. Thanks!