Description Usage Arguments Details Value Warning See Also Examples
Stash and unstash all modules and internal state. List and remove stashes.
1 2 3 4 5 6 7 | stash(comment = NA_character_)
unstash(id = length(.modulr_env$injector$stash))
list_stashes()
remove_stash(id, all)
|
comment |
A string (character vector of length one). |
id |
A scalar (integer vector of length one). |
all |
A flag. Should all stashes be removed? |
stash
allows to stash all modules and the internal state of modulr.
Each stash is pushed on a stack and can be commented for later reference.
unstash
pops a stash from the stack and restores the state
accordingly. list_stashes
lists the stack, showing ids, timestamps and
comments for each stash. remove_stash
removes one or all stashes from
the stack.
A scalar (integer vector of length one) containing the stash ID.
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
, list_modules
, and
reset
.
1 2 3 4 5 6 7 8 9 10 11 | reset()
remove_stash(all = TRUE)
define("foo", NULL, function() NULL)
stash("'foo' only")
list_stashes()
define("bar", NULL, function() NULL)
stash("'foo' and 'bar'")
list_stashes()
list_modules()
unstash(1L)
list_modules()
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.