[R] question on using "warning.expression"
JJ
josh8912 at yahoo.com
Tue Dec 21 01:31:55 CET 2004
Hello:
I would like to flag certain warnings to make them
into errors. I thought I could do this by giving
warning.expression a function to evaluate, in which I
could check the warning message and call stop if I
want.
I tried this:
options(warning.expression=expression(myfunction()))
but it does not appear to actually call myfunction.
The function myfunction instructs that if the warning
has a certain messsage, then stop() is called.
Can anyone help with the proper syntax for
warning.expression? Or is there a better way to do
what I want?
Thanks,
John
More information about the R-help
mailing list