[R] keep information on the number of warnings
David Winsemius
dwinsemius at comcast.net
Thu Jul 31 18:29:35 CEST 2014
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
More information about the R-help
mailing list