# pos.to.env

0th

Percentile

##### Convert Positions in the Search Path to Environments

Returns the environment at a specified position in the search path.

Keywords
utilities
##### Usage
pos.to.env(x)
##### Arguments
x
an integer between 1 and length(search()), the length of the search path, or -1.
##### Details

Several R functions for manipulating objects in environments (such as get and ls) allow specifying environments via corresponding positions in the search path. pos.to.env is a convenience function for programmers which converts these positions to corresponding environments; users will typically have no need for it. It is primitive.

-1 is interpreted as the environment the function is called from.

This is a primitive function.

• pos.to.env
##### Examples
library(base) pos.to.env(1) # R_GlobalEnv # the next returns the base environment pos.to.env(length(search())) 
Documentation reproduced from package base, version 3.3.0, License: Part of R 3.3.0

### Community examples

Looks like there are no examples yet.