| S4formals | R Documentation |
Give the formal arguments of an S4 method.
S4formals(fun, ...)
fun |
name of an S4 generic, a string, or the method, see Details. |
... |
further arguments to be passed to |
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.
a pairlist, like formals
Arguments of a method after those used for dispatch may be different from
the arguments of the generic. The latter may simply have a "\dots"
argument there.
todo: there should be a similar function in the "methods" package, or at least use a documented feature to extract it.
Georgi N. Boshnakov
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.