Rdpack (version 0.4-20)

S4formals: Give the formal arguments of an S4 method

Description

Give the formal arguments of an S4 method.

Usage

S4formals(fun, ...)

Arguments

fun
name of an S4 generic, a string, or the method, see Details.
...
further arguments to be passed to getMethod, see Details.

Value

a pairlist, like formals

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 as 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)
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