Peter
Thank you for the information. I accidentally deleted Ken's post without
having read it.
Ken' s thought is great but as you said awful to implement
I thought that capture.output would come in handy some time when I first
saw it on an unrelated reply.
Just thought :- the latex listings package may have alternatives
If I remember correctly it has wrapping and other goodies but I when I
started to investigate it a while ago I somehow came up with a
non-compilable tex file.
I needed help from someone with more latex experience to progress
Duncan
At 10:12 20/08/2009, you wrote:>Ken
>
>Thanks for your inspiration: This combination of strwrap and writeLines
>seems to "work" in one sense of the word:
>
>
>
># Intro stuff:
>wid <- 50
>option(width=wid)
>hide <- capture.output(example(glm))
>
># The business end:
>writeLines( strwrap( capture.output(summary(glm.D93)), wid))
>
>
>
>Mind you, while it "works", it's an awful construct. I was
actually
>hoping to show this code in my book:
> summary(glm.D93)
>and get the nice output appearing in my book. I don't plan on replacing
>the simple code above with
> writeLines( strwrap( capture.output(summary(glm.D93)), wid))
>in the text of the book. Maybe I can redefine print.summary.glm or
>something (I've done that for the output of anova.glm and anova.lm:
>Shh! Don't tell anyone!).
>
>Thanks for your assistance Ken. All the best in deep Basque country.
>
>P.
>
>Peter Dunn: Biostatistician
>School of Health and Sport Science
>Faculty of Science, Health and Education ML-34
>University of the Sunshine Coast, Locked Bag 4
>Maroochydore DC Qld 4558
>
>Tel: +61 7 5456 5085
>Fax: +61 7 5430 2896
>Email: <mailto:pdunn2@usc.edu.au>pdunn2@usc.edu.au
>www.usc.edu.au
>
>
> >>> Ken Knoblauch <ken.knoblauch@inserm.fr> 19/08/2009 7:56
pm >>>
>perhaps, strtrim
>
>--
>Ken Knoblauch
>Inserm U846
>Stem-cell and Brain Research Institute
>Department of Integrative Neurosciences
>18 avenue du Doyen Lépine
>69500 Bron
>France
>tel: +33 (0)4 72 91 34 77
>fax: +33 (0)4 72 91 34 61
>portable: +33 (0)6 84 10 64 10
><http://www.sbri.fr/members/kenneth-knoblauch.html>http://www.sbri.fr/members/kenneth-knoblauch.html
>
>----------------------------------------------------------------
>This message was sent using IMP, the Internet Messaging Program.
>
>
>
>--
>This message has been scanned for viruses and
>dangerous content by MailScanner, and is
>believed to be clean.
>
>
>CRICOS Provider Number: 01595D
>
>This communication is intended for the recipient only and should not be
>forwarded, distributed or otherwise read by others without express
>permission. The views expressed in this email are not necessarily those of
>the University of the Sunshine Coast.
>
>--
>This message has been scanned for viruses and
>dangerous content by <http://www.mailscanner.info/>MailScanner, and is
>believed to be clean.
[[alternative HTML version deleted]]