Learn R Programming

rlang (version 0.2.2)

ns_env: Get the namespace of a package

Description

Namespaces are the environment where all the functions of a package live. The parent environments of namespaces are the imports environments, which contain all the functions imported from other packages.

Usage

ns_env(pkg = NULL)

ns_imports_env(pkg = NULL)

ns_env_name(pkg = NULL)

Arguments

pkg

The name of a package. If NULL, the surrounding namespace is returned, or an error is issued if not called within a namespace. If a function, the enclosure of that function is checked.

Life cycle

These functions are experimental and may not belong to the rlang package. Expect API changes.

See Also

pkg_env()