Suppose I am writing a text file using the following code.
df <- iris
write.table(df, "data/iris.txt")
When I open the file in Notepad ++ , it displays CRLF.
If I replace \n with \r, it displays CR. If I do the opposite, it becomes LF. So my question is: How can I achieve CR or LF or CRLF directly from the write.table() ( or any other function)?
Notepad ++ has the EOL conversion option in the Edit menu
so if nothing else works you can change to CRLF, LF or CR.
The eol argument of write.table has the options (on my Windows system)