Skip to content
Prev 31283 / 63424 Next

Capturing all warnings (with messages)

Hello,

There is a function captureAll() in the svMisc package on CRAN. Although 
in its current version, it simulates textual output you got at the 
console, it should be rather easy to modify it to return separately 
output, errors and warnings. There is one point to consider: the 
function cannot catch some output from c code, and it does not work well 
with R code needing interaction at the console, like browser() for 
instance. For the rest, its handling of output (visible versus invisible 
output) and of warnings, including management of options(warn = ) is 
very similar to what is done at the console.
Best,

Philippe
..............................................<?}))><........
  ) ) ) ) )
( ( ( ( (    Prof. Philippe Grosjean
  ) ) ) ) )
( ( ( ( (    Numerical Ecology of Aquatic Systems
  ) ) ) ) )   Mons-Hainaut University, Belgium
( ( ( ( (
..............................................................
luke at stat.uiowa.edu wrote: