You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
write_csv() seems to assume when appending to a file that the file concludes with a newline. However, when creating a file in Excel and saving as CSV, that behavior can't be 100% assumed.
Suggestion: When append is TRUE start with a check that the original file ends with a newline, and add one before starting append if not.
when I perform readr::write_csv(whatToAdd, "testfile.csv", append = TRUE) I'm expecting the appending to start on a new line. However I'm instead getting a testfile.csvlooking like
a, b, c, d
1, 2, 3, 4
5, 6, 7, 89, 10, 11, 12
13, 14, 15, 16
Just trying to save the next person from falling into the issue that sucked up a good chunk of my morning. Take care!
The text was updated successfully, but these errors were encountered:
write_csv()
seems to assume when appending to a file that the file concludes with a newline. However, when creating a file in Excel and saving as CSV, that behavior can't be 100% assumed.Suggestion: When append is TRUE start with a check that the original file ends with a newline, and add one before starting append if not.
Current state of feature:
Take
testfile.csv
to read(note lack of newline at end)
and environment variable
whatToAdd
to readtribble( ~a, ~b, ~c, ~d, 9, 10, 11, 12, 13, 14, 15, 16 )
when I perform
readr::write_csv(whatToAdd, "testfile.csv", append = TRUE)
I'm expecting the appending to start on a new line. However I'm instead getting atestfile.csv
looking likeJust trying to save the next person from falling into the issue that sucked up a good chunk of my morning. Take care!
The text was updated successfully, but these errors were encountered: