Sweave does something clever with warnings, which I have so far been
unable to figure out.  There are a couple of threads on the list about
this, but the best in here is a hack to redirect all the output and
stick it back in.

http://www.nabble.com/-R--Sweave-and-warning-messages-td7759353.html#a7759353
http://www.nabble.com/two-questions-on-Sweave-(help-in-the-output-%2B-warnings-in-the-output)-td19579172.html#a19579172

  I thought I could get around this with last.warning , but apparently
that doesn't work -- this file doesn't produce the desired output of
reproducing the last warning ...

  any thoughts?

  Ben Bolker

========================
\documentclass{article}

Test {\tt last.warning}

<<>>=
x <- log(-1)
L <- last.warning
@

<<>>=
L
@

\end{document}
==================

-- 
Ben Bolker
Associate professor, Biology Dep't, Univ. of Florida
bol...@ufl.edu / www.zoology.ufl.edu/bolker
GPG key: www.zoology.ufl.edu/bolker/benbolker-publickey.asc

Attachment: signature.asc
Description: OpenPGP digital signature

______________________________________________
R-help@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.

Reply via email to