EVOLUTION-MANAGER
Edit File: pos.to.env.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: Convert Positions in the Search Path to Environments</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 pos.to.env {base}"><tr><td>pos.to.env {base}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Convert Positions in the Search Path to Environments</h2> <h3>Description</h3> <p>Returns the environment at a specified position in the search path. </p> <h3>Usage</h3> <pre>pos.to.env(x)</pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>x</code></td> <td> <p>an integer between <code>1</code> and <code>length(search())</code>, the length of the search path, or <code>-1</code>.</p> </td></tr> </table> <h3>Details</h3> <p>Several <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> functions for manipulating objects in environments (such as <code><a href="get.html">get</a></code> and <code><a href="ls.html">ls</a></code>) allow specifying environments via corresponding positions in the search path. <code>pos.to.env</code> is a convenience function for programmers which converts these positions to corresponding environments; users will typically have no need for it. It is <a href="Primitive.html">primitive</a>. </p> <p><code>-1</code> is interpreted as the environment the function is called from. </p> <p>This is a <a href="Primitive.html">primitive</a> function. </p> <h3>Examples</h3> <pre> pos.to.env(1) # R_GlobalEnv # the next returns the base environment pos.to.env(length(search())) </pre> <hr /><div style="text-align: center;">[Package <em>base</em> version 3.6.0 <a href="00Index.html">Index</a>]</div> </body></html>