On Mon, Jun 21, 2010 at 4:23 PM, Gábor Csárdi <csa...@rmki.kfki.hu> wrote: > On Mon, Jun 21, 2010 at 4:17 PM, Duncan Murdoch > <murdoch.dun...@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.
FYI, the most "generic" way you can write a generic function is: foo <- function(...) UseMethod("foo"); /Henrik > > Best Regards, > Gabor > > [...] > > > -- > Gabor Csardi <gabor.csa...@unil.ch> UNIL DGM > > ______________________________________________ > R-help@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. > ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.