Rdpack (version 2.6)

S4formals: Give the formal arguments of an S4 method

Description

Give the formal arguments of an S4 method.

Usage

S4formals(fun, ...)

Value

a pairlist, like formals

Arguments

fun

name of an S4 generic, a string, or the method, see Details.

...

further arguments to be passed to getMethod, see Details.

Author

Georgi N. Boshnakov

Details

S4formals gives the formal arguments of the requested method. If fun is not of class methodDefinition, it calls getMethods, passing on all arguments.

Typically, fun is the name of a generic function and the second argument is the signature of the method as a character vector. Alternatively, fun may be the method itself (e.g. obtained previously from getMethod) and in that case the "\dots" arguments are ignored. See getMethod for full details and other acceptable arguments.

Examples

Run this code
require(stats4) # makes plot() S4 generic

S4formals("plot", c(x = "profile.mle", y = "missing"))

m1 <- getMethod("plot", c(x = "profile.mle", y = "missing"))
S4formals(m1)

Run the code above in your browser using DataLab