standardGeneric {base}R Documentation

Formal Method System – Dispatching S4 Methods

Description

The function standardGeneric initiates dispatch of S4 methods: see the references and the documentation of the methods package. Usually, calls to this function are generated automatically and not explicitly by the programmer.

Usage

standardGeneric(f, fdef)

Arguments

f

The name of the generic.

fdef

The generic function definition. Never passed when defining a new generic.

Details

standardGeneric dispatches the method defined for a generic function named f, using the actual arguments in the frame from which it is called.

The argument fdef is inserted (automatically) when dispatching methods for a primitive function. If present, it must always be the function definition for the corresponding generic. Don't insert this argument by hand, as there is no validity checking and miss-specifying the function definition will cause certain failure.

For more, use the methods package, and see the documentation in GenericFunctions.

Author(s)

John Chambers

References

⁠Chambers JM (2008). Software for Data Analysis: Programming with R. Springer, New York. ISBN 978-0-387-75935-7. http://statweb.stanford.edu/~jmc4/Rbook/. (For the R version.)

⁠Chambers JM (1998). Programming with Data. Springer, New York. ISBN 978-0-387-98503-9. (For the original S4 version.)


[Package base version 4.6.0 Index]