Hooks, docs [was [Rd] Multiple options for a package]

Prof Brian D Ripley ripley at stats.ox.ac.uk
Tue Dec 14 16:35:16 CET 2004


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