> ?warnings
No, sorry, this does not work. Try this, if you like:
myfunc <- function () {
warnings ()
}
options (warning.expression=quote (myfunc ()))
warning ("test")
> Also see ?conditions
tryCatch ()
and
withCallingHandlers ()
are a whole different story, as far as I understand them. I actually want
_all_ warnings in the whole session to go through my handler (actually I'm
writing a GUI front-end, and would like to have a way to easily identify all
warnings).
That's what I thought warning.expression was designed for. So am I wrong in
thinking so? If not, how to use it correctly?
> Note that both were suggested by help.search('warning') -- Please do make
> full use of R's internal documentation before posting.
It's quite possible, I'm overlooking something rather obvious. Not that
obvious, however.
Regards
Thomas
______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html