Skip to content
Prev 205225 / 398506 Next

questions on generic functions

Wayne (Yanwei) Zhang wrote:
If you are using S3 approach, you can either define

summary.aa <- summary.bb

or make use of inheritance, i.e. you need to create object of class aa with

class(object.aa) <- c("aa", "bb")
From the naming scheme above I feel you are going the S3 way. If you 
want to use S4 (what setMethod is intended for), you can either use 
setMethod() for the declaration or also use inheritance (already in the 
class definition of class aa in setClass()).

Uwe Ligges