| Line 4... |
Line 4... |
| 4 |
\description{
|
4 |
\description{
|
| 5 |
Show a summary of the methods for one or more generic functions,
|
5 |
Show a summary of the methods for one or more generic functions,
|
| 6 |
possibly restricted to those involving specified classes.
|
6 |
possibly restricted to those involving specified classes.
|
| 7 |
}
|
7 |
}
|
| 8 |
\usage{
|
8 |
\usage{
|
| 9 |
showMethods(f=character(), where=-1, classes=NULL, includeDefs=FALSE,
|
9 |
showMethods(f = character(), where = topenv(parent.frame()), classes = NULL,
|
| 10 |
inherited=TRUE, printTo = stdout())
|
10 |
includeDefs = FALSE, inherited = TRUE, printTo = stdout())
|
| 11 |
}
|
11 |
}
|
| 12 |
\arguments{
|
12 |
\arguments{
|
| 13 |
\item{f}{ One or more function names. If omitted, all functions
|
13 |
\item{f}{one or more function names. If omitted, all functions
|
| 14 |
will be examined. }
|
14 |
will be examined. }
|
| 15 |
\item{where}{If \code{where} is supplied, the methods definition from
|
15 |
\item{where}{If \code{where} is supplied, the methods definition from
|
| 16 |
that position will be used; otherwise, the current definition is
|
16 |
that position will be used; otherwise, the current definition is
|
| 17 |
used (which will include inherited methods that have arisen so far
|
17 |
used (which will include inherited methods that have arisen so far
|
| 18 |
in the session). If \code{f} is omitted, \code{where} controls
|
18 |
in the session). If \code{f} is omitted, \code{where} controls
|
| 19 |
where to look for generic functions.}
|
19 |
where to look for generic functions.}
|
| 20 |
\item{classes}{ If argument \code{classes} is supplied, it is a vector
|
20 |
\item{classes}{ If argument \code{classes} is supplied, it is a vector
|
| 21 |
of class names that restricts the displayed results to those methods
|
21 |
of class names that restricts the displayed results to those methods
|
| 22 |
whose signatures include one or more of those classes. }
|
22 |
whose signatures include one or more of those classes. }
|
| 23 |
\item{includeDefs}{ If \code{includeDefs} is \code{TRUE}, include the
|
23 |
\item{includeDefs}{ If \code{includeDefs} is \code{TRUE}, include the
|
| 24 |
definitions of the individual methods in the printout. }
|
24 |
definitions of the individual methods in the printout. }
|
| 25 |
\item{inherited}{ If \code{inherits} is \code{TRUE}, then methods that
|
25 |
\item{inherited}{ If \code{inherits} is \code{TRUE}, then methods that
|
| 26 |
have been found by inheritance, so far in the session, will be
|
26 |
have been found by inheritance, so far in the session, will be
|
| 27 |
included and marked as inherited. Note that an inherited method
|
27 |
included and marked as inherited. Note that an inherited method
|
| 28 |
will not usually appear until it has been used in this session.
|
28 |
will not usually appear until it has been used in this session.
|
| 29 |
See \code{\link{selectMethod}} if you want to know what method is
|
29 |
See \code{\link{selectMethod}} if you want to know what method is
|
| 30 |
dispatched for particular classes of arguments.}
|
30 |
dispatched for particular classes of arguments.}
|
| 31 |
\item{printTo}{The connection on which the printed information will be
|
31 |
\item{printTo}{The connection on which the printed information will be
|
| 32 |
written. If \code{printTo} is \code{FALSE}, the output will be
|
32 |
written. If \code{printTo} is \code{FALSE}, the output will be
|
| 33 |
collected as a character vector and returned as the value of the
|
33 |
collected as a character vector and returned as the value of the
|
| 34 |
call to \code{showMethod}. See \code{\link{show}}.
|
34 |
call to \code{showMethod}. See \code{\link{show}}.
|
| 35 |
}
|
35 |
}
|
| Line 53... |
Line 53... |
| 53 |
While the programming interface for the \pkg{methods} package follows
|
53 |
While the programming interface for the \pkg{methods} package follows
|
| 54 |
the reference, the R software is an original implementation, so
|
54 |
the reference, the R software is an original implementation, so
|
| 55 |
details in the reference that reflect the S4 implementation may appear
|
55 |
details in the reference that reflect the S4 implementation may appear
|
| 56 |
differently in R. Also, there are extensions to the programming
|
56 |
differently in R. Also, there are extensions to the programming
|
| 57 |
interface developed more recently than the reference. For a
|
57 |
interface developed more recently than the reference. For a
|
| 58 |
discussion of details and ongoing development, see the web page
|
58 |
discussion of details and ongoing development, see the web page
|
| 59 |
\url{http://developer.r-project.org/methodsPackage.html} and the
|
59 |
\url{http://developer.r-project.org/methodsPackage.html} and the
|
| 60 |
pointers from that page.
|
60 |
pointers from that page.
|
| 61 |
}
|
61 |
}
|
| 62 |
\seealso{
|
62 |
\seealso{
|
| 63 |
\code{\link{setMethod}}, and \code{\link{GenericFunctions}}
|
63 |
\code{\link{setMethod}}, and \code{\link{GenericFunctions}}
|
| 64 |
for other tools involving methods;
|
64 |
for other tools involving methods;
|
| 65 |
\code{\link{selectMethod}} will show you the method dispatched for a
|
65 |
\code{\link{selectMethod}} will show you the method dispatched for a
|
| 66 |
particular function and signature of classes for the arguments.
|
66 |
particular function and signature of classes for the arguments.
|
| 67 |
}
|
67 |
}
|
| 68 |
\examples{
|
68 |
\examples{
|
| 69 |
\dontshow{
|
69 |
\dontshow{
|