Access the data inside an S4 method definition
Usage
methodFunction(f, signature, package)
methodFormals(f, signature, package)
Arguments
- f
a generic function or the character-string name of one.
- signature
the signature of classes to match to the arguments
of f
. See the details below.
- package
character(1)
.
Package name.
Examples
## Function ====
x <- methodFunction(
f = "show",
signature = "ANY",
package = "methods"
)
class(x)
#> [1] "function"
body(x)
#> showDefault(object)
## Formals ====
x <- methodFormals(
f = "show",
signature = "ANY",
package = "methods"
)
class(x)
#> [1] "pairlist"
print(x)
#> $object
#>
#>