[Rd] capturing warnings using capture.output
richierocks at gmail.com
Mon Nov 23 11:31:05 CET 2015
>From the Details section of ?capture.output:
Messages sent to stderr() (including those from message, warning and stop)
are captured by type = "message". Note that this can be "unsafe" and should
only be used with care.
Capturing messages works as expected:
capture.output(message("!!!"), type = "message")
##  "!!!"
Capturing warnings doesn't seems to work:
capture.output(warning("!!!"), type = "message")
## Warning message:
## In eval(expr, envir, enclos) : !!!
Is the documentation wrong, or is this a bug, or am I doing doing silly?
[[alternative HTML version deleted]]
More information about the R-devel