Hi all,

I'm trying to build a package, but run into problems with generic functions. 

I have two classes "aa" and "bb", and defined the function "summary.bb". Now I 
want to make "summary.bb" the default method for both classes "aa" and "bb". 
That is, if I have two objects  "object.aa" and "object.bb" from class "aa" and 
"bb" 
respectively, the function call "summary(object.aa)" and "summary(object.bb)" 
will 
apply the function "summary.bb" at default.  How can I do that? Should I use 
"setMethod" ?  Thanks a lot. 

Regards,
Wayne

______________________________________________
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.

Reply via email to