[Rd] Custom per-package options passed down via library() ?
Prof Brian Ripley
ripley at stats.ox.ac.uk
Tue Feb 20 08:46:05 CET 2007
Some packages have their own option-like mechanism, e.g. sm.
Others use environment variables for this purpose.
And there are userhooks for .First.lib, .onLoad and .onAttach that could
In the Hmisc case, you are talking about messages, I believe. You can
handle those via message classes. The latter is not as easy as I would
like (and is currently under discussion), but in this particular case the
message class 'packageStartupMessage' of R >= 2.5.0 seems to be what is
library() does not have a ... argument, so you cannot do what your subject
line suggests. Since library() is scheduled to be replaced by use()
sometime Real Soon Now, it is not being enhanced but I think this is part
of the goals for use().
On Mon, 19 Feb 2007, Dirk Eddelbuettel wrote:
> I want to load an in-house library 'differently' in a particular context and,
> to achieve this, would like to govern the behaviour of its .onLoad()
> In a related context, Frank Harrell and I have been wondering on and off
> about how to tell Hmisc to be less verbose in certain situations. He
> achieves this by placing information in a custom field in options().
> I could do the same in my case -- but am wondering if there is a better way.
> Is there?
> Any hints welcome!
> Regards, 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
More information about the R-devel