Create a Group Generic Version of a Function
setGroupGeneric function behaves like
except that it constructs a group generic function, differing in two
ways from an ordinary generic function. First, this function cannot
be called directly, and the body of the function created will contain
a stop call with this information. Second, the group generic function
contains information about the known members of the group, used to
keep the members up to date when the group definition changes, through
changes in the search list or direct specification of methods, etc.
All members of the group must have the identical argument list.
the character string name of the generic function.
A function object. There isn't likely to be an existing nongeneric of this name, so some function needs to be supplied. Any known member or other function with the same argument list will do, because the group generic cannot be called directly.
arguments to pass to
the names of functions that are known to be members of this group. This information is used to reset cached definitions of the member generics when information about the group generic is changed.
setGroupGeneric function exists for its side effect: saving the
generic function to allow methods to be specified later. It returns
Chambers, John M. (2016) Extending R Chapman & Hall
Methods_Details and the links there for a general discussion,
dotsMethods for methods that dispatch on
setMethod for method definitions.
1 2 3 4 5 6
Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.