library(tidyverse)
# this fails with readr 2.0.0
# make a string of 0123456789<CR> and copy it 13108 times
write.string = intToUtf8(rep(c(seq(48,57),c(13)), 13108))
write.filename = file("test.txt", "wb")
writeBin(write.string, write.filename)
close(write.filename)
# this generates a vroom error
df.test <- readr::read_csv('test.txt', col_types = cols(.default = "c"))
# but this works
# make a string of 0123456789<CR><LF> and copy it 13108 times
write.string = intToUtf8(rep(c(seq(48,57),c(13,10)), 13108))
message is :
Error: The size of the connection buffer (131072) was not large enough
to fit a complete line:
Increase it by setting Sys.setenv("VROOM_CONNECTION_SIZE")
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
Many Thanks, my apologies I missed that bit in the release notes.
A colleague installed a new version of tidyverse and an old file wouldn't read all of a sudden for her but would for me, so it's taken a while to track down the cause and I probably skipped a bit more reading than I should have. On the bright side it led me to discover the hexView package which is just brilliant.