ns-topenv {base} | R Documentation |
Finding the top level environment.
topenv(envir = parent.frame(), matchThisEnv = getOption("topLevelEnvironment"))
envir |
environment. |
matchThisEnv |
return this environment, if it matches before
any other criterion is satisfied. The default, the option
“topLevelEnvironment”, is set by sys.source ,
which treats a specific environment as the top level environment.
Supplying the argument as NULL means it will never match. |
topenv
returns the first top level environment found when
searching envir
and its parent environments. An environment is
considered top level if it is the internal environment of a name space,
a package environment in the search path, or .GlobalEnv
.
topenv(.GlobalEnv) topenv(new.env())