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

John Chambers jmc at r-project.org
Fri Jan 14 16:36:14 CET 2005

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.


More information about the R-devel mailing list