I've read in a text file, which in the global env, looks good:
Note: I am on windows, and the linebreaks are \r\n.
It looks like it was read in properly, because if I look at the textfile in notepad++ I see the symbols:
However, if I try to write the file back using cat
, I get additional {CR} bytes thrown in:
cat(txtFile, file="out.txt", append="FALSE")
This leads to the resulting text file appearing 'double spaced.' Very annoying, and I don't know why cat()
is doing that. I've also tried writeLines
, but any time it tries to write the string to the file, it just puts the {CR}'s before the {CRLF}.
Does anyone know how to stop this behavior?