From jmc at r-project.org  Fri Jan 14 16:36:14 2005
From: jmc at r-project.org (John Chambers)
Date: Fri Jan 14 16:36:31 2005
Subject: [Rd] RE: [R] as.character methods
In-Reply-To: <Pine.LNX.4.61.0501140814390.18523@gannet.stats>
References: <67DCA285A2D7754280D3B8E88EB5480208CA11D2@MSGBOSCLB2WIN.DMN1.FMR.COM>
	<Pine.LNX.4.61.0501140814390.18523@gannet.stats>
Message-ID: <41E7E6EE.1010307@R-project.org>



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.

> 
> 
> 
......


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