[R] S3 generics need identical signature?

Gábor Csárdi csardi at rmki.kfki.hu
Mon Jun 21 16:23:54 CEST 2010


On Mon, Jun 21, 2010 at 4:17 PM, Duncan Murdoch
<murdoch.duncan at gmail.com> wrote:
[...]
> The requirement is that the methods need to have signatures that contain all
> the arguments of the generic.  If the generic includes ..., then the methods
> can add other arguments, too.  So with the generic for plot() as you show
> above, any plot method is required to have x and y as the first two
> arguments, and ... as an argument, but they can have other args too.

This makes sense, and it is actually great! Thanks a lot for the explanation.

Best Regards,
Gabor

[...]


-- 
Gabor Csardi <Gabor.Csardi at unil.ch>     UNIL DGM



More information about the R-help mailing list