From rdpeng at gmail.com  Wed Sep 26 19:54:49 2007
From: rdpeng at gmail.com (Roger Peng)
Date: Wed, 26 Sep 2007 13:54:49 -0400
Subject: [Rd] Lack of final newline in write.dcf changes append usage
Message-ID: <66f3bd910709261054r7532fac3rd454380facdcca40@mail.gmail.com>

The change in r42731 eliminating the final blank line when writing DCF
files changes the way 'append' can be used in 'write.dcf' and I was
wondering if this is intentional.  Basically, I want to write a data
frame to DCF format one row at a time, so I make use of repeated calls
to 'write.dcf(append = TRUE)'. However, in R 2.6.0RC the resulting DCF
file is not formatted properly because there are no blank lines
between the entries.

It seems the only way to use 'write.dcf(append = TRUE)' is to
explicitly write a blank line to the file before writing the entry.
Perhaps 'write.dcf' could be changed to write a blank line in the
beginning if append = TRUE?  I've attached a patch for this
possibility.

-roger
-- 
Roger D. Peng  |  http://www.biostat.jhsph.edu/~rpeng/


[Rd] Lack of final newline in write.dcf changes append usage
Roger Peng