[ top | up ]

Environment Access

Syntax

environment(x=NULL)
environment(x) <- value

Value

If x is a function then environment(x) returns the environment associated with that function. If x is NULL then the global environment is returned.

The assignment form sets the environment of the function x to the value given.

It is an error for x to be anything other than a function or NULL.