Skip to content

write.csv with append = TRUE

3 messages · Alex van der Spek, R. Michael Weylandt, Duncan Murdoch

#
Is there a way to make any of the write functions (.table or .csv) append
to the same file?

I get this warning message and do not know how to enable the appending.

Warning messages:
1: In write.csv(names(Lbys)[c], fo, append = TRUE) :
  attempt to set 'append' ignored
2: In write.csv(Lbys[[c]], fo, append = TRUE) :
  attempt to set 'append' ignored


Regards,
Alex van der Spek
#
write.table() should append just fine. write.csv() doesn't append I'm
told because there's no guarantee it matches the column headings of
the original file. That said, write.table(..., append = TRUE, sep =
",") is a pretty good approximation.

Cheers,
Michael
On Wed, Oct 10, 2012 at 3:44 PM, Alex van der Spek <doorz at xs4all.nl> wrote:
#
On 10/10/2012 10:56 AM, R. Michael Weylandt wrote:
You may also want dec="." and qmethod="double".  I forget if the row 
name defaults are equal...

Duncan Murdoch