Re: [Rd] How to implement package-specific options?

From: Prof Brian Ripley <ripley_at_stats.ox.ac.uk>
Date: Fri 09 Dec 2005 - 11:52:46 GMT

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@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

______________________________________________ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Received on Fri Dec 09 22:59:10 2005

This archive was generated by hypermail 2.1.8 : Fri 09 Dec 2005 - 16:21:31 GMT