EVOLUTION-MANAGER
Edit File: methodUtilities.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>R: Utility Functions for Methods and S-Plus Compatibility</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" type="text/css" href="R.css" /> </head><body> <table width="100%" summary="page for methodUtilities {methods}"><tr><td>methodUtilities {methods}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Utility Functions for Methods and S-Plus Compatibility</h2> <h3>Description</h3> <p>These are <em>internal</em> utilities, currently in the <span class="pkg">methods</span> package, that either provide some functionality needed by the package (e.g., element matching by name), or add compatibility with S-Plus, or both. </p> <h3>Usage</h3> <pre> 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(expr) showDefault(object, oldMethods = TRUE) initMethodDispatch(where = topenv(parent.frame())) methodSignatureMatrix(object, sigSlots = c("target", "defined")) </pre> <h3>Summary of Functions</h3> <dl> <dt><code>allNames</code>:</dt><dd> <p>the character vector of names (unlike <code>names()</code>, never returns <code>NULL</code>). </p> </dd> <dt><code>getFunction</code>:</dt><dd> <p>find the object as a function. </p> </dd> <dt><code>el</code>:</dt><dd><p><code>el(object, i)</code> is equivalent to <code>object[i][[1]]</code> (and should typically be replaceable by object[[i]]). </p> </dd> <dt><code>elNamed</code>:</dt><dd> <p>get the element of the vector corresponding to name. Unlike the <code><a href="../../base/html/Extract.html">[</a></code>, <code><a href="../../base/html/Extract.html">[[</a></code>, and <code><a href="../../base/html/Extract.html">$</a></code> operators, this function requires <code>name</code> to match the element name exactly (no partial matching). </p> </dd> <dt><code>formalArgs</code>:</dt><dd> <p>Returns the names of the formal arguments of this function. </p> </dd> <dt><code>existsFunction</code>:</dt><dd> <p>Is there a function of this name? If <code>generic</code> is <code>FALSE</code>, generic functions are not counted. </p> </dd> <dt><code>findFunction</code>:</dt><dd> <p>return all the indices of the search list on which a function definition for <code>name</code> exists. </p> <p>If <code>generic</code> is <code>FALSE</code>, ignore generic functions. </p> </dd> <dt><code>showDefault</code>:</dt><dd> <p>Utility, used to enable <code>show</code> methods to be called by the automatic printing (via <code>print.default</code>). </p> <p>Argument <code>oldMethods</code> controls whether old-style print methods are used for this object. It is <code>TRUE</code> by default if called directly, but <code>FALSE</code> when called from the <span class="pkg">methods</span> package for automatic printing (to avoid potential recursion). </p> </dd> <dt><code>initMethodDispatch</code>:</dt><dd> <p>Turn on the internal method dispatch code. Called on loading the namespace. Also, if dispatch has been turned off (by calling <code>.isMethodsDispatchOn(FALSE)</code>—a very gutsy thing to do), calling this function should turn dispatch back on again. </p> </dd> <dt><code>methodSignatureMatrix</code>:</dt><dd> <p>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"</code> object into a matrix for printing. </p> </dd> <dt><code>Quote</code>:</dt><dd><p>is a synonym of <code><a href="../../base/html/substitute.html">quote</a>()</code> and considered deprecated. </p> </dd> </dl> <hr /><div style="text-align: center;">[Package <em>methods</em> version 3.6.0 <a href="00Index.html">Index</a>]</div> </body></html>