From ripley at stats.ox.ac.uk  Tue Dec 14 16:35:16 2004
From: ripley at stats.ox.ac.uk (Prof Brian D Ripley)
Date: Tue Dec 14 16:38:06 2004
Subject: Hooks, docs [was [Rd] Multiple options for a package]
In-Reply-To: <2EE026CB-4DE3-11D9-B766-000D93AE1C66@math.uni-augsburg.de>
References: <6.0.1.1.2.20041214112754.03703ec0@stat4ux.stat.ucl.ac.be>
	<Pine.LNX.4.61.0412141203080.8509@gannet.stats>
	<2EE026CB-4DE3-11D9-B766-000D93AE1C66@math.uni-augsburg.de>
Message-ID: <Pine.WNT.4.58.0412141524490.4548@auk>

On Tue, 14 Dec 2004, Simon Urbanek wrote:

> Brian,
>
> thanks for the useful hints! In fact, that code features several
> interesting techniques.
> While reading one of the related docs I stumbled upon a slight problem
> in the UserHooks {base} docs:
>
> pkgname character string: the package/namespace name. If versioned
> install has been used, pkgname should the unversioned name of the
> package and any version information will be stripped.

`should be'

> The last sentence doesn't make too much sense to me - either there's a
> verb missing after the "should" or it should go away altogether
> (depending on what was really meant ...) or there's a better way to put
> it...

It's awkward to have to discuss versioned package names, but they are
treated inconsistently so we need to.

> ... and since we're talking about hooks - is there some standard as of
> what custom hook names should look like? Or maybe the hook parameters?
> (I noticed the one used in grid doesn't supply any parameters at
> all...) And finally how should hooks be documented (or the other way
> round - how does one look for hook documentation)?

We haven't prescribed anything.  Hooks are usually documented under the
functions which call them, and need to accept whatever arguments the caller
might provide.

> Thanks,
> Simon
>
> On Dec 14, 2004, at 8:30 AM, Prof Brian Ripley wrote:
>
> > I also don't see why you need to save options to file _within a
> > session_, and the R testing framework does not do so -- take a look at
> > what massage-examples does.  But if you do save options, remember that
> > some are read-only.  I think you would find .readRDS and allies (see
> > the help page) more convenient.


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


Hooks, docs [was [Rd] Multiple options for a package]
Prof Brian D Ripley