[R] Stifling REprintf() output
jgentry at jimmy.harvard.edu
Mon Sep 8 18:51:21 CEST 2003
In some code that I have written, use of url() is generating the output
"cannot open: HTTP status was `404 Not Found`"
The problem is that I do not want R to be outputting any error messages -
I have 'internet.info' set to 3, show.error.messages set to FALSE and the
url() wrapped in a try(). When the URL is not found I am already handling
it in a manner consistent with the rest of the package and the 'cannot
open' line is confusing some users.
The problem is that I can not figure out how to turn it off, the comment
in printutils says that REprintf writes to stderr and is not redirected by
sink(). The call in question appears to be coming from in_R_HTTPOpen, in
that if the HTTP return code is != 200 the REprintf is called.
Is there any way within R to keep this output from appearing?
More information about the R-help