[R] writing/appending a text file

David Winsemius dwinsemius at comcast.net
Fri Apr 22 17:09:02 CEST 2011

On Apr 22, 2011, at 8:40 AM, PBFrance wrote:

> Hello
> I'm fairly new to R. I have a script which produces a 1-column vector
> (numeric). I can write it to a text file using the write command.  
> What I
> want to do is to run the script a number of times on different input  
> files,
> producing a different 1-column vector each time and save all the  
> vectors to
> a text file so that each vector is one separate column in the text  
> file. I
> had thought of

> append    # the obvious parameter to look for

> ing each new vector as a new column in the unique text
> file, but I don't know if this is possible.

If you have further questions after reading these help files and  
setting, append=TRUE, you should offer an example:


> At the moment, it looks like I will have to create a separate text  
> file each
> time I run the script.


David Winsemius, MD
West Hartford, CT

More information about the R-help mailing list