The namespace environment <namespace:pkgname>
, is a child of
the imports environment, which has the name attribute
imports:pkgname
. It is in turn is a child of
<namespace:base>
, which is a child of the global environment.
(There is also a copy of the base namespace that is a child of the empty
environment.)
The package environment <package:pkgname>
is an ancestor of the
global environment. Normally when loading a package, the objects
listed as exports in the NAMESPACE file are copied from the namespace
to the package environment. However, load_all
by default will
copy all objects (not just the ones listed as exports) to the package
environment. This is useful during development because it makes all
objects easy to access.
To export only the objects listed as exports, use
export_all=FALSE
. This more closely simulates behavior when
loading an installed package with library
, and can be
useful for checking for missing exports.