TITLE(environment @@ Environment Access)
USAGE(
environment(fun = NULL)
environment(fun) <- value
is.environment(obj)
.GlobalEnv
)
ALIAS(environment)
ALIAS(environment<-)
ALIAS(.GlobalEnv)
ALIAS(is.environment)
ARGUMENTS(
ARG(fun @@ a LANG(LINK(function)) or LANG(NULL), which is the default.)
)
VALUE(
If LANG(fun) is a function then LANG(environment(fun))
returns the environment associated with that function.
If LANG(fun) is LANG(NULL) then the global environment, LANG(.GlobalEnv),
 is returned.
PARA
The assignment form sets the environment of the function LANG(fun)
to the LANG(value) given.  LANG(is.environment(obj)) returns LANG(TRUE)
iff LANG(obj) is an LANG(environment).
)
SEEALSO(
The LANG(envir) argument of LANG(LINK(eval)).
)
EXAMPLES(
##-- all three give the same:
environment()
environment(environment)
.GlobalEnv
BLANK
ls(envir=environment(approxfun(1:2,1:2, method="const")))
BLANK
is.environment(.GlobalEnv)# T
)
