Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

namespace

Namespace Development Functions


Description

getLoadingNamespace returns information about the loading namespace. It is a wrapper to loadingNamespaceInfo, that does not throw an error.

Usage

getLoadingNamespace(env = FALSE, info = FALSE, nodev = FALSE)

isLoadingNamespace(ns, nodev = FALSE)

isNamespaceLoaded2(ns)

isDevNamespace(ns)

addNamespaceExport(x)

ns_get(x, ns = NULL, ...)

Arguments

env

logical that indicates that the namespace's environment (i.e. the namespace itself) should be returned.

info

logical that indicates that the complete information list should be returned

nodev

logical that indicates if loading devtools namespace should be discarded.

ns

the name of a namespace or a namespace whose loading state is tested. If missing isLoadingNamespace test if any namespace is being loaded.

x

character vector containing the names of R objects to export in the loading namespace.

...

extra arguments passed to get0.

Value

the name of the loading namespace if env and info are FALSE, an environment if env=TRUE, a list with elements pkgname and libname if info=TRUE.

Functions

  • isLoadingNamespace: Tests if a namespace is being loaded.

  • isNamespaceLoaded2: tests if a given namespace is loaded, without loading it, contrary to isNamespace. It is similar to isNamespaceLoaded – which it uses – but also accepts environments.

  • isDevNamespace: tests the – current – namespace is a devtools namespace.

  • addNamespaceExport: Dynamically adds exported objects into the loading namespace.

  • ns_get: gets an object from a given namespace.


pkgmaker

Development Utilities for R Packages

v0.32.2
GPL (>= 2)
Authors
Renaud Gaujoux [aut, cre]
Initial release
2020-10-20

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.