Reset the modulr internal state.
reset(all = FALSE, .verbose = TRUE)
| all | A flag. Should stashes be also dropped? |
|---|---|
| .verbose | A flag. For internal use only. Should be verbose? |
Reset the modulr internal state: definitions and configurations are dropped,
verbosity is set to default (see set_verbosity), .Last.name is
set to NULL (see .Last.name), and root directory is set to
default (see root_config). After a reset, the special module
modulr is automatically defined. If all is set to TRUE,
stashes are also dropped (see stash).
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.
.Last.name, define,
list_modules, list_stashes,
reset, root_config,
set_verbosity, and stash.
reset()#> [2018-12-02T17:14:10 CET] Resetting modulr state ... OK#> [2018-12-02T17:14:10 CET] Defining 'foo' ... OK#> [2018-12-02T17:14:10 CET] Stashing modulr state, stash #1 ... OK#> [2018-12-02T17:14:10 CET] Entering reset() ... #> [2018-12-02T17:14:10 CET] Resetting modulr state ... OK#> id timestamp comment #> 1 1 2018-12-02T17:14:10 CET foo stashroot_config$get_all()#> [[1]] #> [1] "." "modules" #> [3] "module" "libs" #> [5] "lib" "/home/aclemen1/.modulr" #> [7] "/opt/R/3.2.5/lib64/R/etc/modulr.d" #>.Last.name#> NULLreset(all = TRUE)#> [2018-12-02T17:14:10 CET] Resetting modulr state ... OK#>