[R] write.table() or write.csv() --- add a comment?

ivo welch ivowel at gmail.com
Mon Apr 3 03:38:56 CEST 2006

Dear R group:  Is there a way to pass a comment line to write.table()
or write.csv()?  presumably, following linux and R conventions, it
would be preceded by a '#' in the output.

write.csv( object, file="object.csv", comment=paste("this csv file was
created by mycode.R on 12/2/2005");

of course, the R read functions are already smart enough to ignore the
comment lines.

help appreciated.  regards,  /ivo welch

More information about the R-help mailing list