[R] warning.expression?

Roger D. Peng rpeng at jhsph.edu
Thu Sep 22 18:45:05 CEST 2005


You might be interested in 'tryCatch' to catch warnings.

-roger

Thomas Friedrichsmeier wrote:
> Hi!
> 
> I'm trying to catch all warning-messages for special handling. It seems 
> options (warning.expression=myfunc ()) can be used for that. However, the 
> question is: How can I get at the actual warning in myfunc ()? Apparently in 
> S, you can use .C("get_last_message") for that. Is there a similar mechanism 
> in R?
> 
> Thanks for your help!
> Thomas
> 
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
> 

-- 
Roger D. Peng
http://www.biostat.jhsph.edu/~rpeng/




More information about the R-help mailing list