On Jul 31, 2014, at 9:26 AM, Luis Borda de Agua wrote:

> I’m using R 3.1.0 in OS X 10.9.4 (Mavericks)
> 
> I’m running a function Y that calls a function X which occasionally generates 
> a warning. 
> Say that I call the function X 1000 times, and out of these 1000 times I get 
> the following message:
> 
> "There were 36 warnings (use warnings() to see them)"
> 
> How can I store the number 36 in a variable in function Y?
> 
> In other words, how can I extract the information on the number of warnings 
> generated?

length(warnings())

-- 

David Winsemius
Alameda, CA, USA

______________________________________________
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