refer {mod}R Documentation

Copy Bindings from a Module to Another

Description

Can only be used inside a module expression. Makes reference to objects from one module, with specified filters.

Usage

refer(..., include = c(), exclude = c(), prefix = "", sep = ".")

Arguments

...

names of modules; dot-dot-dot

include

names to include; character

exclude

names to excludde; character

prefix

prefix to names; character

sep

separator between prefix and names; character

Value

NULL; invisible

Examples


mod_a <- mod::ule(number <- 1)
mod_b <- mod::ule(number <- 2)

mod_c <- mod::ule({
    mod:::refer(mod_a, mod_b, prefix = .)
    # It is suggested to omit mod::: when using
    number <- mod_a.number + mod_b.number
})

mod_c$number


[Package mod version 0.1.3 Index]