Skip to content
Prev 76172 / 398502 Next

S3 class question

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.