There should be an option to specify what character should be on the end of a line. I am dealing with a process of loading data to a database from .csv files, and it only works when the eol is a Carriage Return Line Feed (as is done when Windows Excel saves a .csv file). The current function saves with a Line Feed, and I do not see any option to change this, unless I missed it.
The text was updated successfully, but these errors were encountered:
I'm having the same issue - I have to send data to an external client who is expecting the EOL to be the Windows version (CRLF) and when using write_delim they're not able to process the file because it's written with just "\n" at end of line. There's an eol argument in write.table, and on Windows it appears to default to "\r\n" as expected (which I can use as a workaround), but it'd be awesome if the tidyverse version behaved similarly to write.table for EOLs.
I'm having the same problem. If you're wondering whether there's an undocumented way to get this to work (as I was), there isn't. The newline is hard-coded in write_delim.cpp in the stream_delim_row function:
output << '\n';
I'm not sure of the most appropriate way to make this configurable,
Also encountering an error discovered when a specific installation of Excel adds a blank row between all rows. I think it is interpreting LF and CR as two new lines. Several other Mac and Windows installations of Excel don't seem have this issue when opening the file, but it seems easier to fix at the write_tsv stage than to find the seemingly non-existent setting in Excel or by editing every saved TSV to remove carriage returns.
R also adds random line breaks after a specific amount of symbols on a line - without eol flags, which makes reading it again impossible, as a line break may also be recognized as a start of a new entry (e.g. python pandas)