The R Project SVN R

Rev

Rev 27442 | Rev 47143 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
27442 ripley 1
\name{getS3method}
2
\alias{getS3method}
3
\title{Get An S3 Method}
4
\description{
5
  Get a method for an S3 generic, possibly from a namespace. 
6
}
7
\usage{
8
getS3method(f, class, optional = FALSE)
9
}
10
\arguments{
11
  \item{f}{character: name of the generic.}
12
  \item{class}{character: name of the class.}
13
  \item{optional}{logical: should failure to find the generic or a
14
    method be allowed?}
15
}
16
\details{
17
  S3 methods may be hidden in packages with namespaces, and will not
18
  then be found by \code{\link{get}}: this function can retrieve
19
  such functions, primarily for debugging purposes.
20
}
21
\value{
22
  The function found, or \code{NULL} if no function is found and
23
  \code{optional = TRUE}.
24
}
25
\seealso{
26
  \code{\link{methods}}, \code{\link{get}}
27
}
28
\examples{
27464 ripley 29
require(stats)
27442 ripley 30
exists("predict.ppr") # false
31
getS3method("predict", "ppr")
32
}
33
\keyword{data}
34