Dear R-users, using the interactive mode, the command > summary(my.survreg.object) will output details of the object my.survreg.object in a very neat fashion. I would like to have that sent to a file, in ascii format, as it appears within the interactive mode. Is that possible ? This seems like a very simple task, but i haven't found the solution: - print doesn't care about a file option - save(my.surreg.object,file="tmp",ascii=T) almost does it but puts every word on its own line, so "tmp" contains a very long column of words. - dump will output the structure of the object so it can be loaded back. - write is suited for matrices of data, not arbitrary objects. Something else i should look at ? Thanks, Chuck --- Charles Dugas, Ph.D., A.S.A. Professeur adjoint, D?partement de Math?matiques et Statistique Universit? de Montr?al www.dms.umontreal.ca t?l. : (514) 343-6433 cell. : (514) 592-9301
pretty print of summary
2 messages · Charles Dugas, Marc Schwartz
On Fri, 2005-03-11 at 22:49 -0500, Charles Dugas wrote:
Dear R-users, using the interactive mode, the command
> summary(my.survreg.object)
will output details of the object my.survreg.object in a very neat fashion. I would like to have that sent to a file, in ascii format, as it appears within the interactive mode. Is that possible ? This seems like a very simple task, but i haven't found the solution: - print doesn't care about a file option - save(my.surreg.object,file="tmp",ascii=T) almost does it but puts every word on its own line, so "tmp" contains a very long column of words. - dump will output the structure of the object so it can be loaded back. - write is suited for matrices of data, not arbitrary objects. Something else i should look at ?
See either ?capture.output or ?sink HTH, Marc Schwartz