EVOLUTION-MANAGER
Edit File: getAnywhere.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: Retrieve an R Object, Including from a Namespace</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 getAnywhere {utils}"><tr><td>getAnywhere {utils}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Retrieve an R Object, Including from a Namespace</h2> <h3>Description</h3> <p>These functions locate all objects with name matching their argument, whether visible on the search path, registered as an S3 method or in a namespace but not exported. <code>getAnywhere()</code> returns the objects and <code>argsAnywhere()</code> returns the arguments of any objects that are functions. </p> <h3>Usage</h3> <pre> getAnywhere(x) argsAnywhere(x) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>x</code></td> <td> <p>a character string or name.</p> </td></tr> </table> <h3>Details</h3> <p>These functions look at all loaded namespaces, whether or not they are associated with a package on the search list. </p> <p>They do not search literally “anywhere”: for example, local evaluation frames and namespaces that are not loaded will not be searched. </p> <p>Where functions are found as registered S3 methods, an attempt is made to find which namespace registered them. This may not be correct, especially if namespaces have been unloaded. </p> <h3>Value</h3> <p>For <code>getAnywhere()</code> an object of class <code>"getAnywhere"</code>. This is a list with components </p> <table summary="R valueblock"> <tr valign="top"><td><code>name</code></td> <td> <p>the name searched for</p> </td></tr> <tr valign="top"><td><code>objs</code></td> <td> <p>a list of objects found</p> </td></tr> <tr valign="top"><td><code>where</code></td> <td> <p>a character vector explaining where the object(s) were found</p> </td></tr> <tr valign="top"><td><code>visible</code></td> <td> <p>logical: is the object visible</p> </td></tr> <tr valign="top"><td><code>dups</code></td> <td> <p>logical: is the object identical to one earlier in the list.</p> </td></tr> </table> <p>In computing whether objects are identical, their environments are ignored. </p> <p>Normally the structure will be hidden by the <code>print</code> method. There is a <code>[</code> method to extract one or more of the objects found. </p> <p>For <code>argsAnywhere()</code> one or more argument lists as returned by <code><a href="../../base/html/args.html">args</a></code>. </p> <h3>See Also</h3> <p><code><a href="getS3method.html">getS3method</a></code> to find the method which would be used: this might not be the one of those returned by <code>getAnywhere</code> since it might have come from a namespace which was unloaded or be registered under another name. </p> <p><code><a href="../../base/html/get.html">get</a></code>, <code><a href="getFromNamespace.html">getFromNamespace</a></code>, <code><a href="../../base/html/args.html">args</a></code> </p> <h3>Examples</h3> <pre> getAnywhere("format.dist") getAnywhere("simpleLoess") # not exported from stats argsAnywhere(format.dist) </pre> <hr /><div style="text-align: center;">[Package <em>utils</em> version 3.6.0 <a href="00Index.html">Index</a>]</div> </body></html>