Undefine a module by dropping it definition from the modulr internal state.

undefine(name = .Last.name)

Arguments

name

A string (character vector of lenght one).

A module name can contain letters, figures and some special characters, namely _, -, and /. The latter is a namespace separator.

Names containing /mock/, /mocks/, /test/, /tests/, /example/, or /examples/ have a special meaning related to code testing and examples.

The name "modulr" corresponds to a special module and is therefore reserved.

Warning

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.

See also

define, list_modules, and reset.

Examples

#> [2018-12-02T17:14:13 CET] Resetting modulr state ... OK
define("foo", NULL, function() "foo")
#> [2018-12-02T17:14:13 CET] Defining 'foo' ... OK
#> name version storage along type weight calls dependencies uses size #> 1 foo <NA> in-memory <NA> <NA> <NA> 0 0 0 984 bytes #> lines modified #> 1 2 2018-12-02T17:14:13 CET
undefine("foo")
#> [2018-12-02T17:14:13 CET] Undefining 'foo' ... OK