as.environment
Coerce to an Environment Object

Description

Coerce the package name, position of the package in the search list, or a list to a corresponding environment.

Usage

as.environment(x)

Arguments

x an environment, a character string, integer value (or vector of integer), or a list with names.

Details

as.environment is a primitive function.
Value
returns either one object or a list of objects of the class "environment". These objects can have one or both of the following attributes:
See Also
pos.to.env, search
Examples
objects(as.environment(list(x=999, y=888)))
as.environment("package:stats")
as.environment(2)
pos.to.env(2)   # Same as as.environment(2)
Package base version 6.1.1-7
Package Index