[Rd] package 'stats' needs import directive for 1.9.0?

Prof Brian Ripley ripley at stats.ox.ac.uk
Thu Feb 26 22:25:05 MET 2004


I suggest you don't try: there are already quite a few 1.9.0-specific 
versions of packages on CRAN, and 1.8.x will be history in a couple of 
months.

On Thu, 26 Feb 2004, Heywood, Giles wrote:

> I maintain the Irregular Time Series (its) package on CRAN.  I am currently
> testing a release.  Under 1.8.1 I am able to define a S4 generic 'start' as
> follows:
> 
> if(!isGeneric("start")) {setGeneric("start", useAsDefault=start)}

Why do you need to do that?  You could just define an S4 method which will 
automatically make a generic if needed.

> Under 1.9.0, Rcmd check generates an error, as 'start' is not recognised.
> If I use the NAMESPACE directive IMPORT, all is well:
> 
> import(stats)
> 
> (I recall some past postings about refactoring 'base', and I assume that
> 'stats' is a part of this)

See the NEWS file ....

> However, the additional directive leads to problems under 1.8.1, as one
> might expect, since 'stats' does not exist under 1.8.1.  How to define my S4
> generic and make it transparent so that the base function start() is
> unaffected, in such a way that it will function under 1.8.1 and 1.9.0?

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