Re: [R] Potential bug in readLines when reading empty lines

2025-06-27 Thread Richard O'Keefe
What you wrote was " it is literally impossible for the function to accept a connection that has been opened with arbitrary mode and provide that kind of flexibility in line end handling." Personally I think that readLines has NO business whatever reading anything from a binary mode connection. I a

Re: [R] Potential bug in readLines when reading empty lines

2025-06-27 Thread Jeff Newmiller via R-help
If you reply to me then you should respond to what I wrote, not something else. My point was that the software architecture of having readLines read characters from an abstract connection stream that may have been opened in either binary or text mode does not allow the readLines function to ena

Re: [R] Potential bug in readLines when reading empty lines

2025-06-27 Thread Marttila Mikko via R-help
Hi all, On Windows I'm seeing the following: > tf <- tempfile() > writeBin(charToRaw("\r\r\n"), tf) > readLines(file(tf, "r")) [1] "" > readLines(file(tf, "rb")) [1] "" "" "" The former matches Guido's observation of a disappearing line (also on Windows), the latter seems to correspond to Duncan