Cliff Clive
2010-Jul-15 14:41 UTC
[R] write.csv() : attempt to set 'append' ignored... Why?
I'm running R 2.11.0 on a 32-bit Windows XP machine. Whenever I try to write a csv file with 'append' set to TRUE, I get this message: attempt to set 'append' ignored. Obviously, this is no good, since R is deleting my previously saved data files, rather than appending to them. What can I do to fix this? -- View this message in context: http://r.789695.n4.nabble.com/write-csv-attempt-to-set-append-ignored-Why-tp2290254p2290254.html Sent from the R help mailing list archive at Nabble.com.
Marc Schwartz
2010-Jul-15 15:36 UTC
[R] write.csv() : attempt to set 'append' ignored... Why?
On Jul 15, 2010, at 9:41 AM, Cliff Clive wrote:> > I'm running R 2.11.0 on a 32-bit Windows XP machine. Whenever I try to write > a csv file with 'append' set to TRUE, I get this message: attempt to set > 'append' ignored. > > Obviously, this is no good, since R is deleting my previously saved data > files, rather than appending to them. What can I do to fix this?Read ?write.csv more carefully: In the "CSV files" section: These wrappers are deliberately inflexible: they are designed to ensure that the correct conventions are used to write a valid file. Attempts to change append, col.names, sep, dec or qmethod are ignored, with a warning. If you want to use 'append', you will need to use write.table() and adjust the other arguments as you require. HTH, Marc Schwartz
Use write.table() instead. I thought that I had used write.csv() with an append before but I cannot find an example. Perhaps append= is not available in write.csv --- On Thu, 7/15/10, Cliff Clive <cliffclive at gmail.com> wrote:> From: Cliff Clive <cliffclive at gmail.com> > Subject: [R] write.csv() : attempt to set 'append' ignored... Why? > To: r-help at r-project.org > Received: Thursday, July 15, 2010, 10:41 AM > > I'm running R 2.11.0 on a 32-bit Windows XP machine.? > Whenever I try to write > a csv file with 'append' set to TRUE, I get this message: > attempt to set > 'append' ignored. > > Obviously, this is no good, since R is deleting my > previously saved data > files, rather than appending to them.? What can I do > to fix this? > -- > View this message in context: http://r.789695.n4.nabble.com/write-csv-attempt-to-set-append-ignored-Why-tp2290254p2290254.html > Sent from the R help mailing list archive at Nabble.com. > > ______________________________________________ > R-help at r-project.org > mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, > reproducible code. >