Re: [Rd] RE: [R] as.character methods

From: John Chambers <>
Date: Sat 15 Jan 2005 - 02:36:14 EST

Prof Brian Ripley wrote:

 > Please use R-devel not R-help for esoteric programming questions: I have
 > moved this there.  [See the posting guide.]  Anything involving the
 > methods package is definitely not for R-help: I doubt if 1% of the
 > readership of R-help have knowingly used it.

I believe the general guidelines for what goes in r-help and what in r-devel are clear enough without actively discouraging discussion of classes and methods. It's the nature of the question, not a litmus test for discussing this or that package that is the helpful distinction.


> if (is.primitive(baseDef)) {
> value <- genericForPrimitive(f)
> and it seems John Chambers has defined an S4 generic for as.character
> with one arg, "x". Had he not done so it would have been (x, ...). My
> guess is that this is because in S the arg list is (x) and he overlooked
> that it was not in R, but only he knows.

Well, let's say that he usually implemented the S4 generics for primitives assuming R might follow the description in the Blue Book. Further checking against the R online documentation was done, but obviously not often enough. Life is, however, short.

No intention to create incompatibility between the S4 generic and S3 code in this case, we should fix that.

There are some cases in which the generic needs extra named arguments to allow sensible methods, for example "[". I can't think of any case where one would intentionally have _fewer_ arguments in the generic.


...... mailing list Received on Sat Jan 15 01:50:20 2005

This archive was generated by hypermail 2.1.8 : Sat 15 Jan 2005 - 02:24:07 EST