Re: [R] write.csv and header

2009-12-16 Thread Patrick Connolly
On Tue, 15-Dec-2009 at 01:55PM +0100, Gustaf Rydevik wrote: | Hi, | | ?write.table and the argument append should be of help. | example: | | sink(test.csv) | cat(-) | cat(\n) | cat(This is \n a test of header) | cat(\n) | cat(-) |

Re: [R] write.csv and header

2009-12-16 Thread rkevinburton
I have a small request regarding this append feature. As it is now if the data is appended to the file so is the header. I would like to have the header only entered once and appends just append the data. Doable? Kevin Patrick Connolly p_conno...@slingshot.co.nz wrote: On Tue,

Re: [R] write.csv and header

2009-12-16 Thread rkevinburton
I have a small request regarding this append feature. As it is now if the data is appended to the file so is the header. I would like to have the header only entered once and appends just append the data. Doable? Kevin Patrick Connolly p_conno...@slingshot.co.nz wrote: On Tue,

Re: [R] write.csv and header

2009-12-16 Thread John Kane
Just write the headers once and append as many times as needed? You can append as many datasets as you want. --- On Wed, 12/16/09, rkevinbur...@charter.net rkevinbur...@charter.net wrote: From: rkevinbur...@charter.net rkevinbur...@charter.net Subject: Re: [R] write.csv and header

Re: [R] write.csv and header

2009-12-15 Thread Gustaf Rydevik
On Mon, Dec 14, 2009 at 4:37 PM, Walther, Alexander awaltherm...@googlemail.com wrote: Dear list, I would like to export a matrix to a TXT-File by using write.csv (not necessarily). Is there a way to add a header (with additional informations concerning the project) spanning multiple lines

[R] write.csv and header

2009-12-14 Thread Walther, Alexander
Dear list, I would like to export a matrix to a TXT-File by using write.csv (not necessarily). Is there a way to add a header (with additional informations concerning the project) spanning multiple lines to this file before the actual data are listed up? Should look like this: date: filename:

Re: [R] write.csv and header

2009-12-14 Thread Patrick Hausmann
Hi Alex, try this mfile - c:\\ex01.txt nperm - 12 sDate - paste(date: , 2009-12-13, sep=) sFile - paste(filename: , mfile, sep=) sPerm - paste(number of permutations: , nperm, sep=) mt - matrix(1:10, 2) sink(mfile) cat(sDate, \n) cat(sFile, \n) cat(sPerm, \n)