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

Frank E Harrell Jr f.harrell at vanderbilt.edu
Wed Dec 27 19:30:43 CET 2006


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:
> | > Hi,
> | >
> | > 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)

Frank

> 	> sink()
> 	> cat("Hi again\n")
> 	Hi again
> 	> 
> 
> Hth, Dirk
> 


-- 
Frank E Harrell Jr   Professor and Chair           School of Medicine
                      Department of Biostatistics   Vanderbilt University



More information about the R-help mailing list