From ripley at stats.ox.ac.uk  Fri Apr 27 16:10:42 2007
From: ripley at stats.ox.ac.uk (Prof Brian Ripley)
Date: Fri, 27 Apr 2007 15:10:42 +0100 (BST)
Subject: [Rd] How to suppress 'Loading required package ...' via
 Depends/Imports
In-Reply-To: <17969.64551.962449.586155@basebud.nulle.part>
References: <17969.64551.962449.586155@basebud.nulle.part>
Message-ID: <Pine.LNX.4.64.0704271506170.29708@gannet.stats.ox.ac.uk>

See ?suppressMessages

I did:

> suppressPackageStartupMessages(library("mboost"))

and saw no messages at all in 2.5.0.  (And that is one of the noisiest.)


On Fri, 27 Apr 2007, Dirk Eddelbuettel wrote:

>
> I tend to run batch jobs via littler. These often start with a single line
> loading one or two in-house packages.  Now, most the Depends of these
> in-house packages now use Depends: entries in DESCRIPTION, rather than
> require() in R/zzz.R.  This seems to have at least one undesirable side
> effect: noise.
>
> Using require(), I can choose the 'quietly=TRUE, warn.conflict=FALSE'
> arguments, and additionally I can wrap the require call in stopfifnot()
> making it both quiet and failure proof.
>
> But I cannot figure out how to tell R via DESCRIPTION how to
>  a) not tell me its loading a package
>  b) keep quiet about the conflicts
>
> In other words, how do I get rid of all this:
>
>  foo:~s> ./someLittlerScript
>  Loading required package: MASS
>  Loading required package: grDevices
>  Loading required package: graphics
>  Loading required package: stats
>  Loading required package: utils
>  Loading required package: zoo
>
>  Attaching package: 'zoo'
>
>
>          The following object(s) are masked from package:base :
>
>           rapply
>
> Thanks, Dirk
>
>

-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595



[Rd] How to suppress 'Loading required package ...' via Depends/Imports
Prof Brian Ripley