Skip to content
Prev 256715 / 398506 Next

strategy for writing out file with lines header initiated with comment sign

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 13/04/11 15:15, jim holtman wrote:
or:

myData <- as.data.frame(matrix(letters[1:25], 5))
writeLines(c("#comment", "# lines", "# in the file"), con = "./test.csv")
write.table(myData, "./test.csv", append=TRUE)

Cheers,

Rainer
- -- 
Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation
Biology, UCT), Dipl. Phys. (Germany)

Centre of Excellence for Invasion Biology
Stellenbosch University
South Africa

Tel :       +33 - (0)9 53 10 27 44
Cell:       +33 - (0)6 85 62 59 98
Fax :       +33 - (0)9 58 10 27 44

Fax (D):    +49 - (0)3 21 21 25 22 44

email:      Rainer at krugs.de

Skype:      RMkrug
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk2lo98ACgkQoYgNqgF2egovxwCeN7G2It+1petLynKW37fIqKbW
YIkAmwfMSgfLLZwTGDHJ2dNsVp5muj+7
=Cfj2
-----END PGP SIGNATURE-----