[R] Writing GLM/GEE Ouput to Text File

Lanre Okusanya lanre.okusanya at gmail.com
Mon Mar 17 17:29:58 CET 2008


have you tried using sink() ?

LAnre

On Mon, Mar 17, 2008 at 12:07 PM, jim holtman <jholtman at gmail.com> wrote:
> ?capture.output
>  ?sink
>
>  On 3/17/08, Charles Willis <willis.charlie at gmail.com> wrote:
>  > Hello,
>  >
>  > How can one write the output of a GLM/GEE model to a text file, such that
>  > the results appear in text file in the same (or similar) format they appear
>  > in the R console?  For instance, I have the following model:
>  >
>  > Traitresult <- compar.gee(Y~X, data = data, family = "binomial", phy = tree,
>  > scale.fix = TRUE, scale.value = 1)
>  >
>  > How would I write "Traitresult" to a text file? I have tried using the
>  > write, write.table, and save functions, but they are not working, giving me
>  > either a warning that 'Traitresult' is not a list or giving me a text file
>  > with a bunch of symbol gibberish.
>  >
>  > Thank you!
>  >
>  > charlie
>  >
>  >
>  >
>  > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>  > Charles G. Willis
>  > Department of Organismic and Evolutionary Biology
>  > 22 Divinity Ave Cambridge MA 02139
>  > HP (857) 488-2506
>  > WP (617) 496-3890
>  > cgwillis at oeb.harvard.edu
>  > http://www.people.fas.harvard.edu/%7Ecgwillis/
>  > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>  >
>  >        [[alternative HTML version deleted]]
>  >
>  > ______________________________________________
>  > R-help at r-project.org mailing list
>  > https://stat.ethz.ch/mailman/listinfo/r-help
>  > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
>  > and provide commented, minimal, self-contained, reproducible code.
>  >
>
>
>  --
>  Jim Holtman
>  Cincinnati, OH
>  +1 513 646 9390
>
>  What is the problem you are trying to solve?
>
>  ______________________________________________
>  R-help at r-project.org mailing list
>  https://stat.ethz.ch/mailman/listinfo/r-help
>  PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
>  and provide commented, minimal, self-contained, reproducible code.
>



More information about the R-help mailing list