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()#> [2017-06-21T21:58:30 UTC] Resetting modulr state ... OK#> [2017-06-21T21:58:30 UTC] Defining 'foo' ... OK#> [2017-06-21T21:58:30 UTC] Stashing modulr state, stash #1 ... OK#> [2017-06-21T21:58:30 UTC] Entering reset() ... #> [2017-06-21T21:58:30 UTC] Resetting modulr state ... OK#> id timestamp comment #> 1 1 2017-06-21T21:58:30 UTC foo stashroot_config$get_all()#> [[1]] #> [1] "../inst/modules" #>.Last.name#> NULLreset(all = TRUE)#> Error in reset(all = TRUE): unused argument (all = TRUE)#> id timestamp comment #> 1 1 2017-06-21T21:58:30 UTC foo stash