\HeaderA{methodUtilities}{Utility Functions for Methods and S-Plus Compatibility}{methodUtilities}
\aliasA{allNames}{methodUtilities}{allNames}
\aliasA{el}{methodUtilities}{el}
\aliasA{el<\Rdash}{methodUtilities}{el<.Rdash.}
\aliasA{elNamed}{methodUtilities}{elNamed}
\aliasA{elNamed<\Rdash}{methodUtilities}{elNamed<.Rdash.}
\aliasA{existsFunction}{methodUtilities}{existsFunction}
\aliasA{formalArgs}{methodUtilities}{formalArgs}
\aliasA{functionBody}{methodUtilities}{functionBody}
\aliasA{functionBody<\Rdash}{methodUtilities}{functionBody<.Rdash.}
\aliasA{getFunction}{methodUtilities}{getFunction}
\aliasA{initMethodDispatch}{methodUtilities}{initMethodDispatch}
\aliasA{methodSignatureMatrix}{methodUtilities}{methodSignatureMatrix}
\aliasA{Quote}{methodUtilities}{Quote}
\aliasA{showDefault}{methodUtilities}{showDefault}
\keyword{internal}{methodUtilities}
\begin{Description}\relax
These are utilities, currently in the \pkg{methods} package, that
either provide some functionality needed by the package (e.g., element
matching by name), or add compatibility with S-Plus, or both.
\end{Description}
\begin{Usage}
\begin{verbatim}
functionBody(fun=sys.function(sys.parent()))

allNames(x)

getFunction(name, generic=TRUE, mustFind=TRUE, where)

el(object, where)

elNamed(x, name, mustFind=FALSE)

formalArgs(def)

Quote()

showDefault(object, oldMethods = TRUE)

initMethodDispatch(where = topenv(parent.frame()))

methodSignatureMatrix(object, sigSlots = c("target", "defined"))
\end{verbatim}
\end{Usage}
\begin{Section}{Summary of Functions}
\describe{
\item[\code{allNames}:] the character vector of names (unlike \code{names()}, never
returns \code{NULL}).

\item[\code{getFunction}:] find the object as a function.

\item[\code{elNamed}:] get the element of the vector corresponding to name.  Unlike the
\code{[}, \code{[[}, and \code{\$} operators, this function 
requires \code{name} to match the element name exactly (no partial
matching).

\item[\code{formalArgs}:] Returns the names of the formal arguments of this function.

\item[\code{existsFunction}:] Is there a function of this name?  If \code{generic} is
\code{FALSE}, generic functions are not counted. 

\item[\code{findFunction}:] return all the indices of the search list on which a function
definition for \code{name} exists.  

If \code{generic} is \code{FALSE}, ignore generic functions.

\item[\code{showDefault}:] Utility, used to enable \code{show} methods to be called by the
automatic printing (via \code{print.default}).

Argument \code{oldMethods} controls whether old-style print
methods are used for this object.  It is \code{TRUE} by default
if called directly, but \code{FALSE} when called from the
\pkg{methods} package for automatic printing (to avoid potential
recursion).

\item[\code{initMethodDispatch}:] Turn on the internal method dispatch code.  Called on attaching
the package.  Also, if dispatch has been turned off (by calling
\code{.isMethodsDispatchOn(FALSE)}---a very gutsy thing to do),
calling this function should turn dispatch back on again.

\item[\code{methodSignatureMatrix}:] Returns a matrix with the contents of the specified slots as rows.  The slots should be named character strings of the same length.  Basically used to turn the signatures of a \code{"MethodDefinition"} objectg into a matrix for printing.

}
\end{Section}

