Learn R Programming

modules (version 0.9.8)

loaded_modules: Environment of loaded modules

Description

Each module is stored as an environment inside loaded_modules with the module<U+2019>s code location path as its identifier. The path rather than the module name is used because module names are not unique: two modules called a can exist nested inside modules b and c, respectively. Yet these may be loaded at the same time and need to be distinguished.

is_module_loaded tests whether a module is already lodaded

cache_module caches a module namespace and marks the module as loaded.

uncache_module removes a module namespace from the cache, unloading the module from memory.

clear_modules_cache unloads all loaded modules from the cache.

get_loaded_module returns a loaded module, identified by its path, from cache.

Usage

loaded_modules

is_module_loaded(module_path)

cache_module(module_ns)

uncache_module(module_ns)

clear_modules_cache()

get_loaded_module(module_path)

Arguments

module_path

fully resolved module path

module_ns

module namespace environment

Format

An object of class environment of length 0.