| S7_methods | R Documentation |
List the methods registered on an S7 generic, or the methods registered
for a given class across all S7 generics defined in attached packages.
S7_methods(generic = NULL, class = NULL)
generic |
An S7 generic. |
class |
A class specification (anything accepted by |
A data frame with one row per matching method and columns:
generic: the generic's name.
package: the package the generic is defined in, or NA for generics
found in the global environment (or when generic is supplied
directly).
signature: a list column of S7_signature objects describing the
dispatch signature. format() them for a human-readable description.
Foo <- new_class("Foo", package = NULL)
Bar <- new_class("Bar", package = NULL)
my_gen <- new_generic("my_gen", "x")
method(my_gen, Foo) <- function(x) "foo"
method(my_gen, Bar) <- function(x) "bar"
S7_methods(generic = my_gen)
S7_methods(class = Foo)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.