[R] writing text and output to file with flexibility

Gonçalo Ferraz gferraz29 at gmail.com
Sat Aug 30 22:22:19 CEST 2008

I want a function to write some of its output into a text file with  
the following format:

'some text'
output matrix A
'some more text'
output matrix B
'some other text still'
output matrix C

The dimensions of matrices A, B, ... are different and the total  
number of matrices
that I want to place in the text file depends on what I pass to the  
function. (I would like to have values
from adjacent columns separated by tabs.)

'write' seems to place only one matrix into one file. 'sink' seems to  
write only what I write, word by word.
Is there a standard solution for this type of problem?

Thank you,


More information about the R-help mailing list