[R] how to suppress a "loading required package: ..." message
Frank E Harrell Jr
f.harrell at vanderbilt.edu
Thu Dec 28 07:22:52 CET 2006
Dirk Eddelbuettel wrote:
>
> 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.
Dirk,
I spent a significant amount of time a year ago trying to get the more
general approach to work but to no avail. As I recall there either was
missing documentation or some failure of the system to pass a correct
argument to .First.lib. Hence the creation of the workaround.
Frank
>
> In any event, Gabor's one-liner is preferable here as it is generic.
>
> Dirk
>
>
--
Frank E Harrell Jr Professor and Chair School of Medicine
Department of Biostatistics Vanderbilt University
More information about the R-help
mailing list