[R] Sweave and warning messages

Jean lobry lobry at biomserv.univ-lyon1.fr
Sun Dec 10 15:45:13 CET 2006


>How does one tell Sweave() to include analysis warning
>messages in the verbatim output?

That's something I would like to know too. If you are not
affraid by a shameless hack, you can use sink() to redirect
stderr into the LaTeX output file and redefine warning()
to encapsulate this within a Soutput environment:

Sweaving this file:
http://pbil.univ-lyon1.fr/members/lobry/R/warning.rnw
gives me this result:
http://pbil.univ-lyon1.fr/members/lobry/R/warning.pdf

Best,
-- 
Jean R. Lobry            (lobry at biomserv.univ-lyon1.fr)
Laboratoire BBE-CNRS-UMR-5558, Univ. C. Bernard - LYON I,
43 Bd 11/11/1918, F-69622 VILLEURBANNE CEDEX, FRANCE
allo  : +33 472 43 27 56     fax    : +33 472 43 13 88
http://pbil.univ-lyon1.fr/members/lobry/




More information about the R-help mailing list