callGeneric
Call the Current Generic Function

Description

Calls the current generic function with modified arguments.

Usage

callGeneric(...)

Arguments

... arguments to be evaluated by the generic function.

Details

If callGeneric is called with no arguments, callGeneric evaluates a call to the generic function with the same set of arguments as the method calling callGeneric (in particular, missing arguments will still be missing). If the argument variables have been changed in the method, the new values are passed to the generic.
If callGeneric has one or more arguments, the generic function is called with these arguments.
This is used most frequently when one method wants to change the class of argument(s) and then call another method. Note that the name of the (actual) generic is not one of the arguments. This works for either ordinary or group generic methods.
Value
the value returned by the generic function given the specified arguments.
See Also
setMethod
Examples

setClass("track", representation(x = "numeric", y = "numeric")) setMethod("Math", "track", function(x) { # call specific Math generic member (sin, abs, etc) on x@y x@y <- callGeneric(x@y) x })

Package methods version 6.0.0-69
Package Index