[R] Writing out complex text file
sdavis2 at mail.nih.gov
Tue Mar 7 23:47:03 CET 2006
On 3/7/06 5:10 PM, "Sean Davis" <sdavis2 at mail.nih.gov> wrote:
> I have a group of data.frames that I need to write out interspersed with
> some complex header information at the top of each. The file needs include
> many such data.frame/header pairs. Is it as simple as using a connection
> and printing to it everything (including tabs and endlines, etc.), or is
> there some other way to go about this?
After some experimentation, I answered my own qeustion. Just open a
connection using file and then use writeLines and write.table, passing the
connection object to each. Works like a charm.
More information about the R-help