ns_env: Return the namespace environment for a package.

View source: R/namespace-env.R

ns_envR Documentation

Return the namespace environment for a package.

Description

Contains all (exported and non-exported) objects, and is a descendant of R_GlobalEnv. The hierarchy is ⁠<namespace:pkg>⁠, ⁠<imports:pkg>⁠, ⁠<namespace:base>⁠, and then R_GlobalEnv.

Usage

ns_env(package)

Arguments

package

package name.

Details

If the package is not loaded, this function returns NULL.

See Also

pkg_env() for the attached environment that contains the exported objects.

imports_env() for the environment that contains imported objects for the package.


r-lib/pkgload documentation built on Feb. 3, 2024, 9:48 p.m.