reset: Reset the Modulr Internal State.

View source: R/define.R

resetR Documentation

Reset the Modulr Internal State.

Description

Reset the modulr internal state.

Usage

reset(all = FALSE, .verbose = TRUE)

Arguments

all

A flag. Should stashes be also dropped?

.verbose

A flag. For internal use only. Should be verbose?

Details

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).

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

.Last.name, define, list_modules, list_stashes, reset, root_config, set_verbosity, and stash.

Examples

reset()
define("foo", NULL, function() NULL)
root_config$set("./foobar")
stash(comment = "foo stash")
set_verbosity(+Inf)
reset()
list_modules()
list_stashes()
root_config$get_all()
.Last.name
reset(all = TRUE)
list_stashes()


aclemen1/modulr documentation built on Oct. 2, 2024, 7:18 a.m.