Skip to content

need to find (and distinguish types of) carriage returns in a file that is scanned using scan

2 messages · Quicke, Donald L J, Brian Ripley

#
On Sat, 19 Aug 2006, Quicke, Donald L J wrote:

            
Why scan?
only what?
Sounds like a job for readLines.
AFAIK there is only type of carriage return character (ASCII code Ctrl-M).  
If you mean between CRLF, LF and perhaps CR line endings, you need to read 
the files as raw bytes since R's text mode regards all three as equally a 
line ending.  But that can perfectly well be done using binary-mode 
connections.
Sounds like a job for connections ...
PLEASE do as we ask.