Skip to content

S3 class question

3 messages · Joel Bremson, Bert Gunter, Gabor Grothendieck

#
Have you defined matSummary() as a generic with UseMethod:

matSummary<-function(...)UseMethod('matSummary')


-- Bert Gunter
Genentech Non-Clinical Statistics
South San Francisco, CA
 
"The business of the statistician is to catalyze the scientific learning
process."  - George E. P. Box
#
On 8/25/05, Joel Bremson <joel3000 at gmail.com> wrote:
Methods have to have a corresponding generic to be called like that.
Assuming your method has a single argument called ret define this:

matSummary <- function(ret) UseMethod("matSummary")

When you call matSummary the UseMethod call will forward
it to the appropriate method depending on the class of the
first argument, ret.