EVOLUTION-MANAGER
Edit File: MethodsList.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: MethodsList Objects</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 MethodsList {methods}"><tr><td>MethodsList {methods}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>MethodsList Objects</h2> <h3>Description</h3> <p>These functions create and manipulate <code>MethodsList</code> objects, the objects formerly used in <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> to store methods for dispatch. Use of these objects is deprecated since <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> 3.2.0, as it will rarely be a good idea. Where methods dispatch is to be studied, see <code><a href="getMethod.html">selectMethod</a></code>. For computations that iterate over methods or over method signatures, see <code><a href="findMethods.html">findMethods</a></code>, which returns a linearized methods list to hold method definitions, usually more convenient for iteration than the recursive <code>MethodsList</code> objects. </p> <h3>Usage</h3> <pre> listFromMlist(mlist, prefix = list(), sigs. = TRUE, methods. = TRUE) linearizeMlist(mlist, inherited = TRUE) finalDefaultMethod(method) loadMethod(method, fname, envir) ##--------- These are all deprecated, since R 3.2.0 ---------- MethodsList(.ArgName, ...) makeMethodsList(object, level=1) SignatureMethod(names, signature, definition) insertMethod(mlist, signature, args, def, cacheOnly) inheritedSubMethodLists(object, thisClass, mlist, ev) showMlist(mlist, includeDefs = TRUE, inherited = TRUE, classes, useArgNames, printTo = stdout() ) ## S3 method for class 'MethodsList' print(x, ...) mergeMethods(m1, m2, genericLabel) </pre> <h3>Details</h3> <dl> <dt><code>listFromMlist</code>:</dt><dd> <p>Undo the recursive nature of the methods list, making a list of <code>list(sigs,methods)</code> of function definitions, i.e. of matching signatures and methods. <code>prefix</code> is the partial signature (a named list of classes) to be prepended to the signatures in this object. If <code>sigs.</code> or <code>methods.</code> are <code>FALSE</code>, the resulting part of the return value will be empty. </p> <p>A utility function used to iterate over all the individual methods in the object, it calls itself recursively. </p> </dd> <dt><code>linearizeMlist</code>:</dt><dd> <p>Undo the recursive nature of the methods list, making a list of function definitions, with the names of the list being the corresponding signatures. </p> <p>Designed for printing; for looping over the methods, use the above <code>listFromMlist</code> instead. </p> </dd> <dt><code>finalDefaultMethod</code>:</dt><dd> <p>The default method or NULL. With the demise of <code>"MethodsList"</code> objects, this function only checks that the value given it is a method definition, primitive or NULL. </p> </dd> </dl> <dl> <dt><code>loadMethod</code>:</dt><dd> <p>Called, if necessary, just before a call to <code>method</code> is dispatched in the frame <code>envir</code>. The function exists so that methods can be defined for special classes of objects. Usually the point is to assign or modify information in the frame environment to be used evaluation. For example, the standard class <code>MethodDefinition</code> has a method that stores the target and defined signatures in the environment. Class <code>MethodWithNext</code> has a method taking account of the mechanism for storing the method to be used in a call to <code><a href="NextMethod.html">callNextMethod</a></code>. </p> <p>Any methods defined for <code>loadMethod</code> must return the function definition to be used for this call; typically, this is just the <code>method</code> argument. </p> </dd> </dl> <h3>References</h3> <p>Chambers, John M. (2008) <em>Software for Data Analysis: Programming with R</em> Springer. (For the R version.) </p> <p>Chambers, John M. (1998) <em>Programming with Data</em> Springer (For the original S4 version.) </p> <hr /><div style="text-align: center;">[Package <em>methods</em> version 3.6.0 <a href="00Index.html">Index</a>]</div> </body></html>