loadMethod {methods}R Documentation

Load an S4 Method

Description

Internal generic function with methods; only for internal use of methods initialization.

Usage

loadMethod(method, fname, envir)

Details

Called, if necessary, just before a call to method is dispatched in the frame envir. The function exists so that methods can be defined for special classes of objects. Usually the point is to assign or modify information in the frame environment to be used evaluation. For example, the standard class MethodDefinition has a method that stores the target and defined signatures in the environment. Class MethodWithNext has a method taking account of the mechanism for storing the method to be used in a call to callNextMethod.

Any methods defined for loadMethod must return the function definition to be used for this call; typically, this is just the method argument.

References

Chambers, John M. (2008) Software for Data Analysis: Programming with R Springer. (For the R version.)

Chambers, John M. (1998) Programming with Data Springer (For the original S4 version.)


[Package methods version 4.5.0 Index]