Clone a module.
clone(name, from_name, deep = FALSE)
name | A string (character vector of lenght one). A module name can contain letters, figures and some special characters,
namely Names containing The name "modulr" corresponds to a special module and is therefore reserved. |
---|---|
from_name | Name of module to clone. |
deep | A flag. Should the entire register entry be cloned? |
A wrapper function around a make call for the defined module.
For versioning purposes, it is often useful to clone modules.
It is considered a very bad practice to define, touch, undefine, load, make, reset, or perform any other operation from within a module definition that may alterate the internal state of modulr.
define
, make
, reset
,
and root_config
.
reset()#> [2018-12-02T17:13:56 CET] Resetting modulr state ... OK#> [2018-12-02T17:13:56 CET] Defining 'foo' ... OKclone("bar", "foo")#> [2018-12-02T17:13:56 CET] Defining 'bar' ... OKmake("bar")#> [2018-12-02T17:13:56 CET] Making 'bar' ... #> [2018-12-02T17:13:56 CET] * Visiting and defining dependencies ... #> [2018-12-02T17:13:56 CET] * Constructing dependency graph ... OK #> [2018-12-02T17:13:56 CET] DONE ('bar' in 0.026 secs)#> [1] "foo"