getNamespaceInfo
Access Namespace Environment Information

Description

Retrieves and assigns information associated with namespace environments.

Usage

getNamespaceInfo(ns, which)
setNamespaceInfo(ns, which, val)

Arguments

ns a namespace environment or a character string giving the name of a namespace environment.
which a character string specifying which type of namespace information should be retrieved or replaced. The supported types are described in the Value section.
val the value to assign as the specified namespace information. These values are described in the Value section.

Details

Value
setNamespaceInfo invisibly returns val.
getNamespaceInfo returns various types of information associated with the namespace ns. According to the value of which, the return value is the following:
which="DLLs" a named list of "DLLInfo" objects for dynamic libraries to load. See getLoadedDLLs for the description of a "DLLInfo" object.
which="dynlibs" a character vector containing the names of dynamic libraries to load.
which="exports" an environment containing each name exported from the namespace. The value of each name in the environment is the name string itself.
which="imports" a named list with one or more components, where each element name is the name of a namespace importing objects to ns. The value of each component is either the logical value TRUE (for namespace "base"), or a named character vector of imported object names (where the vector names and values are the same imported names).
which="lazydata" an environment containing all of the lazy data objects that can be loaded. It should have an attribute "name" in the form of "lazydata:(ns)".
which="path" the absolute path of the library that ns corresponding to.
which="S3methods" a 3-column character matrix. Each row represents one registered S3 method. The three columns represent the generic, class, and method in turn.
which="spec" a character vector with two named elements. The first "name" element represents the name of the namespace environment. The second "version" element is read from the DESCRIPTION file.
See Also
getNamespace, library, loadNamespace, getLoadedDLLs.
Examples
## list all exports from "stats"
ls(getNamespaceInfo("stats", "exports"), all.names= TRUE)

## list imports to "stats" from various packages getNamespaceInfo("stats", "imports")

## show name and version for "stats" getNamespaceInfo("stats", "spec")

Package base version 6.1.1-7
Package Index