use: Load/Attach a Module to the Search Path

Description Usage Arguments Value Examples

View source: R/core.R View source: R/utils.R

Description

Load/Attach a Module to the Search Path

Usage

1
2
use(module, as, parent = baseenv(), lock = TRUE,
  expose_private = FALSE)

Arguments

module

module object, or path to a module file

as

name when attached to search; character

parent

the enclosing environment

lock

lock the environment; logical

expose_private

expose the private environment as '..private..'; logical

Value

TRUE if successful; invisible

Examples

1
2
3
4
5
6
7
module_path <- system.file("misc", "example_module.R", package = "mod")
example_module <- acquire(module_path)

# Attach module object to search path
use(example_module)
# or directly from file
use(module_path, "example_module")

mod documentation built on Aug. 23, 2019, 5:05 p.m.

Related to use in mod...