> From: Prof Brian Ripley <[EMAIL PROTECTED]>
> Subject: Re: [Rd] package 'stats' needs import directive for 1.9.0?
> To: "Heywood, Giles" <[EMAIL PROTECTED]>
> Cc: [EMAIL PROTECTED]
... 
> 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.
> 
I'm not sure I understand the advice here. I have also hit the same problem,
and it seems reasonable to me to aspire to maintain a single package which
works on both 1.8.x and 1.9.x. 

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

I think that explicit Genericisation (?) has virtues from the point of view
of code legibility.
...
> 
> > 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?
> > 
My solution was to only do a require(stats)  if running > 1.9.

______________________________________________
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-devel

Reply via email to