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

namespace

Module namespace handling


Description

make_namespace creates a new module namespace.

Usage

make_namespace(info)

is_namespace(env)

namespace_info(ns, which, default = NULL)

namespace_info(ns, which) <- value

mod_topenv(env = parent.frame())

is_mod_topenv(env)

Arguments

info

the module info.

env

an environment that may be a module namespace.

ns

the module namespace environment.

which

the key (as a length 1 character string) of the info to get/set.

default

default value to use if the key is not set.

value

the value to assign to the specified key.

Details

The namespace contains a module’s content. This schema is very much like R package organisation. A good resource for this is: <http://obeautifulcode.com/R/How-R-Searches-And-Finds-Stuff/>

Value

make_namespace returns the newly created module namespace for the module described by info.


box

Write Reusable, Composable and Modular R Code

v1.0.2
MIT + file LICENSE
Authors
Konrad Rudolph [aut, cre] (<https://orcid.org/0000-0002-9866-7051>), Michael Schubert [ctb] (<https://orcid.org/0000-0002-6862-5221>)
Initial release

We don't support your browser anymore

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