| Line 1... |
Line 1... |
| 1 |
% File src/library/base/man/ns-topenv.Rd
|
1 |
% File src/library/base/man/ns-topenv.Rd
|
| 2 |
% Part of the R package, https://www.R-project.org
|
2 |
% Part of the R package, https://www.R-project.org
|
| 3 |
% Copyright 1995-2015 R Core Team
|
3 |
% Copyright 1995-2019 R Core Team
|
| 4 |
% Distributed under GPL 2 or later
|
4 |
% Distributed under GPL 2 or later
|
| 5 |
|
5 |
|
| 6 |
\name{ns-topenv}
|
6 |
\name{ns-topenv}
|
| 7 |
\title{Top Level Environment}
|
7 |
\title{Top Level Environment}
|
| 8 |
\alias{topenv}
|
8 |
\alias{topenv}
|
| Line 19... |
Line 19... |
| 19 |
|
19 |
|
| 20 |
\item{matchThisEnv}{return this environment, if it matches before
|
20 |
\item{matchThisEnv}{return this environment, if it matches before
|
| 21 |
any other criterion is satisfied. The default, the option
|
21 |
any other criterion is satisfied. The default, the option
|
| 22 |
\samp{topLevelEnvironment}, is set by \code{\link{sys.source}},
|
22 |
\samp{topLevelEnvironment}, is set by \code{\link{sys.source}},
|
| 23 |
which treats a specific environment as the top level environment.
|
23 |
which treats a specific environment as the top level environment.
|
| 24 |
Supplying the argument as \code{NULL} means it will never match.}
|
24 |
Supplying the argument as \code{NULL} or \code{emptyenv()} means
|
| - |
|
25 |
it will never match.}
|
| 25 |
}
|
26 |
}
|
| 26 |
\details{
|
27 |
\details{
|
| 27 |
\code{topenv} returns the first top level \code{\link{environment}}
|
28 |
\code{topenv} returns the first top level \code{\link{environment}}
|
| 28 |
found when searching \code{envir} and its enclosing environments. An
|
29 |
found when searching \code{envir} and its enclosing environments. If no
|
| - |
|
30 |
top level environment is found, \code{\link{.GlobalEnv}} is returned. An
|
| 29 |
environment is considered top level if it is the internal environment
|
31 |
environment is considered top level if it is the internal environment
|
| 30 |
of a namespace, a package environment in the \code{\link{search}}
|
32 |
of a namespace, a package environment in the \code{\link{search}}
|
| 31 |
path, or \code{\link{.GlobalEnv}} .
|
33 |
path, or \code{\link{.GlobalEnv}} .
|
| 32 |
}
|
34 |
}
|
| 33 |
\seealso{
|
35 |
\seealso{
|