[R] Keeping track of occurrence of warning message
laurent at cbs.dtu.dk
Tue Jul 15 09:17:28 CEST 2003
On Tue, Jul 15, 2003 at 02:58:10PM +0800, Tan Chuen Seng wrote:
> Hi there,
> I am interested if there is anyway to keep track of the occurrence of
> warning message.
> I know that warnings will only be printed out at the end of the program
> if warn=0. However I am also interested at which particular set of data
> does the warnings occur too. This is because I am running 1000 data, so
> if there are 2 or 3 data that give warnings, I would like to know which
> are the ones out of the 1000 data.
> I tried using the following code in the program to indicate where the
> warning occur but was unable to get anything recorded although the
> warnings() gave me 12 messages.
> Your help is greatly appreciated. Thanks.
> >From chuen seng
> [[alternative HTML version deleted]]
> R-help at stat.math.ethz.ch mailing list
One way to do things is to have a list to store warnings has you
hit them in you loop: you can access what is the list last.warning.
Hopin' it helps,
More information about the R-help