EVOLUTION-MANAGER
Edit File: packageName.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: Find Package Associated with an Environment</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 packageName {utils}"><tr><td>packageName {utils}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Find Package Associated with an Environment</h2> <h3>Description</h3> <p>Many environments are associated with a package; this function attempts to determine that package. </p> <h3>Usage</h3> <pre> packageName(env = parent.frame()) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>env</code></td> <td> <p>The environment whose name we seek. </p> </td></tr> </table> <h3>Details</h3> <p>Environment <code>env</code> would be associated with a package if <code><a href="../../base/html/ns-topenv.html">topenv</a>(env)</code> is the namespace environment for that package. Thus when <code>env</code> is the environment associated with functions inside a package, or local functions defined within them, <code>packageName</code> will normally return the package name. </p> <p>Not all environments are associated with a package: for example, the global environment, or the evaluation frames of functions defined there. <code>packageName</code> will return <code>NULL</code> in these cases. </p> <h3>Value</h3> <p>A length one character vector containing the name of the package, or <code>NULL</code> if there is no name. </p> <h3>See Also</h3> <p><code><a href="../../methods/html/getPackageName.html">getPackageName</a></code> is a more elaborate function that can construct a name if none is found. </p> <h3>Examples</h3> <pre> packageName() packageName(environment(mean)) </pre> <hr /><div style="text-align: center;">[Package <em>utils</em> version 3.6.0 <a href="00Index.html">Index</a>]</div> </body></html>