Learn R Programming

svMisc (version 0.9-60)

getEnvironment: Get an environment, knowing its position

Description

Given a position in the search path, the corresponding environment is returned.

Usage

getEnvironment(pos)

Arguments

pos
The position in the search path. If pos = -1, then the parent environment is returned.

Value

  • An environment.

Examples

Run this code
getEnvironment(1)
getEnvironment(length(search())) # base environment

Run the code above in your browser using DataLab