Learn R Programming

mod (version 0.1.3)

require: Load/Attach Package to Local Search Path

Description

Can only be used in a module expression. Emulates the effect of base::require() in its containing module, making functions and their chain of environment availab.e Masks base::require() inside a module context.

Usage

require(package)

Arguments

package

name of the package; name or character

Value

NULL; invisible

Examples

Run this code
# NOT RUN {
mod_tcl <- mod::ule({
    mod:::require(tcltk)
    # It is suggested to omit mod::: when using
    f <- tcl
})

identical(mod_tcl$f, tcltk::tcl)

# }

Run the code above in your browser using DataLab