From maechler at stat.math.ethz.ch  Mon Feb  9 10:18:15 2009
From: maechler at stat.math.ethz.ch (Martin Maechler)
Date: Mon, 9 Feb 2009 10:18:15 +0100
Subject: [Rd] best reference on generics
In-Reply-To: <49875ACC.1010805@prodsyse.com>
References: <49875ACC.1010805@prodsyse.com>
Message-ID: <18831.62679.44766.411000@stat.math.ethz.ch>

>>>>> "SpG" == Spencer Graves <spencer.graves at prodsyse.com>
>>>>>     on Mon, 02 Feb 2009 12:42:52 -0800 writes:

    SpG> Hello, All: What would you say is the best succinct
    SpG> reference to cite on use of generic functions,
    SpG> especially S3 generics?

In a very strict sense, S3 generics don't exist; 
S4 ones do.
Less strictly, an R function that uses UseMethod() is an
S3-generic.

?UseMethod  is a pretty good reference, 
and BTW, contains

>> Note:
>> 
>>      This scheme is called _S3_ (S version 3).  For new projects, it is
>>      recommended to use the more flexible and robust _S4_ scheme
>>      provided in the 'methods' package.

[so for a forthcoming book and package, it's pity that S4 had
 not been used...

 Yes, now I go hide before the flames roar at me !
]

Martin Maechler, ETH Zurich

    SpG>       I want to add an appropriate citation on this to
    SpG> a forthcoming book in the Springer "useR!" series
    SpG> (discussing the use of the 'fda' package, which uses
    SpG> the S3 standard).

    SpG>       Thanks, Spencer Graves

    SpG> ______________________________________________
    SpG> R-devel at r-project.org mailing list
    SpG> https://stat.ethz.ch/mailman/listinfo/r-devel



[Rd] best reference on generics
Martin Maechler