This was mentioned in the release notes for readr 2.0.0
- Normalizing newlines in files with just carriage returns
\r is no longer supported. The last major OS to use only CR as the newline was 'classic' Mac OS, which had its final release in 2001.
Unfortunately despite this convention having not been used in any major OS in over two decades, Microsoft Excel for macOS still outputs CSVs in this style. So we will likely have to bring back support for it.
For now you can use the first edition to read the file
write.string = intToUtf8(rep(c(seq(48,57),c(13)), 10))
write.filename = file("test.txt", "wb")
writeBin(write.string, write.filename)
close(write.filename)
library(readr)
with_edition(1, readr::read_csv("test.txt"))
#>
#> ── Column specification ────────────────────────────────────────────────────────
#> cols(
#> `0123456789` = col_character()
#> )
#> Warning: 1 parsing failure.
#> row col expected actual file
#> 10 0123456789 embedded null 'test.txt'
#> # A tibble: 10 × 1
#> `0123456789`
#> <chr>
#> 1 "0123456789"
#> 2 "0123456789"
#> 3 "0123456789"
#> 4 "0123456789"
#> 5 "0123456789"
#> 6 "0123456789"
#> 7 "0123456789"
#> 8 "0123456789"
#> 9 "0123456789"
#> 10 ""
Created on 2021-08-24 by the reprex package (v2.0.0)