After executing write.csv the file connection is closed, because of which whenever I write data into the file, the old data is lost. But I want to keep writing data into the file without losing the old data. How do I do that? Thanks in advance.
Asked
Active
Viewed 153 times
-1
-
1http://stackoverflow.com/help/mcve, Code – theblindprophet May 24 '16 at 12:08
1 Answers
1
You need to change the argument append = TRUE
.
Have a look at ?write.csv
EDIT:
As @r.bot suggested using write.table
might be a better option that write.csv
which might return an error. More info here.

epo3
- 2,991
- 2
- 33
- 60
-
1I'm dont think that append works for csv files. I just tested it and got the message `attempt to set 'append' ignored`. It works for `write.table` though – r.bot May 24 '16 at 12:13
-