[R] how to suppress a "loading required package: ..." message

Dirk Eddelbuettel edd at debian.org
Thu Dec 28 03:55:57 CET 2006



Frank,

On 27 December 2006 at 12:30, Frank E Harrell Jr wrote:
| Dirk Eddelbuettel wrote:
| > On 27 December 2006 at 08:52, BBands wrote:
| > | On 12/27/06, jacinthe at gmx.de <jacinthe at gmx.de> wrote:
| > | > how to suppress a "loading required package:... " message?
| > | 
| > | require(package, quiet=TRUE)
| > 
| > Some packages insist on talking even when they are asked to be quiet, in
| > which case I have also resorted to wrapping sink() around the loading:
| > 
| > 	> sink("/dev/null")
| > 	> library(Hmisc)
| 
| For that one, do options(Hverbose=FALSE) before library(Hmisc)

With all due respect, I think you are misguided here. Per-package options for
verbosity strike me as suboptimal. IMHO, if options("verbose") is FALSE, or
if the quiet argument to require() has been given, Hmisc should simply be
quiet.

In any event, Gabor's one-liner is preferable here as it is generic.

Dirk


-- 
Hell, there are no rules here - we're trying to accomplish something. 
                                                  -- Thomas A. Edison



More information about the R-help mailing list