isNamespace
Check if an Environment is a (base) Namespace Environment

### Description

Tests whether the specified environment is a (base) namespace environment for a loaded package.

### Usage

    isNamespace(ns)
    isBaseNamespace(ns)

### Arguments

ns | a string or a namespace environment.

Value
returns TRUE if ns is a (base) namespace environment for a loaded package.
See Also
getNamespace, library.
Examples

    # most environments are not namespace environments
    identical(isNamespace(globalenv()), FALSE)
    identical(isNamespace(baseenv()), FALSE)
    identical(isNamespace(new.env()), FALSE)
    # here is the namespace environment for the "base" package
    identical(isNamespace(getNamespace("base")), TRUE)
    # check for base namespace environment
    isBaseNamespace(getNamespace("base")) # TRUE
    isBaseNamespace(getNamespace("stats")) # FALSE

Package base version 6.1.5-18
Package Index