[Rd] How to implement package-specific options?

Prof Brian Ripley ripley at stats.ox.ac.uk
Fri Dec 9 12:52:46 CET 2005


On Fri, 9 Dec 2005, Bjørn-Helge Mevik wrote:

> Dear developeRs,
>
> What is the preferred way to implement package-specific options?
>
> Should one simply use options() -- e.g. options(myoption = myvalue)?
> (And how should one document such options?)

You can, but documentation is the problem.  It is possible to have your 
own options.Rd and help() will detect this and report there are two or 
more, but end-users may be confused.

> Or is it better to implement a separate mechanismn, perhaps something
> like ps.options()?

I think package sm() has a good solution.

-- 
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 mailing list