\HeaderA{getS3method}{Get An S3 Method}{getS3method}
\keyword{data}{getS3method}
\begin{Description}\relax
Get a method for an S3 generic, possibly from a namespace.
\end{Description}
\begin{Usage}
\begin{verbatim}
getS3method(f, class, optional = FALSE)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{f}] character: name of the generic.
\item[\code{class}] character: name of the class.
\item[\code{optional}] logical: should failure to find the generic or a
method be allowed?
\end{ldescription}
\end{Arguments}
\begin{Details}\relax
S3 methods may be hidden in packages with namespaces, and will not
then be found by \code{\LinkA{get}{get}}: this function can retrieve
such functions, primarily for debugging purposes.
\end{Details}
\begin{Value}
The function found, or \code{NULL} if no function is found and
\code{optional = TRUE}.
\end{Value}
\begin{SeeAlso}\relax
\code{\LinkA{methods}{methods}}, \code{\LinkA{get}{get}}
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
require(stats)
exists("predict.ppr") # false
getS3method("predict", "ppr")
\end{ExampleCode}
\end{Examples}

