Learn R Programming

mod (version 0.1.3)

thing: Make a Thing

Description

A "thing" is a special object made based on a module. Contains an active binding, defined with the `dot` argument.

Usage

thing(..., dot, parent = parent.frame(), lock = TRUE,
  expose_private = FALSE)

Arguments

...

module expression

dot

function expression used for active binding to `.`

parent

the enclosing environment

lock

lock the environment; logical

expose_private

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

Value

a module containing an active binding

Examples

Run this code
# NOT RUN {
my_thing <- mod::thing({
    a <- 1
}, dot = function() a)

my_thing$.

my_thing[]

# }

Run the code above in your browser using DataLab