This help topic is for R version 1.7.1. For the current version of R, try https://stat.ethz.ch/R-manual/R-patched/library/base/html/ns-topenv.html
ns-topenv {base}R Documentation

Top Level Environment

Description

Finding the top level environment.

Usage

topenv(envir = parent.frame())

Arguments

envir

environment.

Details

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.

Examples

topenv(.GlobalEnv)
topenv(new.env())

[Package base version 1.7.1 ]