From ripley at stats.ox.ac.uk  Fri Dec  9 12:52:46 2005
From: ripley at stats.ox.ac.uk (Prof Brian Ripley)
Date: Fri, 9 Dec 2005 11:52:46 +0000 (GMT)
Subject: [Rd] How to implement package-specific options?
In-Reply-To: <m0zmnav6qs.fsf@bar.nemo-project.org>
References: <m0zmnav6qs.fsf@bar.nemo-project.org>
Message-ID: <Pine.LNX.4.61.0512091150320.10509@gannet.stats>

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


[Rd] How to implement package-specific options?
Prof Brian Ripley