Skip to content

catch error/warning message in a loop

3 messages · array chip, Spencer Graves, Brian Ripley

#
cat can only catch the error message promptly, but
seems not able to catch the warning message promptly.
Can anyone point out how i can catch the warning
message in a loop?
--- Spencer Graves <spencer.graves at PDF.COM> wrote:

            
https://www.stat.math.ethz.ch/mailman/listinfo/r-help
#
?warnings asserts, " `warnings' prints the top-level variable 
'last.warning' in a pleasing form."

	  Have you tried something like "cat(i, last.warning)"?

hth.  spencer graves
array chip wrote:

            

            
#
On Mon, 2 Jun 2003, array chip wrote:

            
options(warn=1) or = 2