Description Usage Arguments Value Examples
Run the stages in a stageRunner object.
1 2 3 |
from |
an indexing parameter. Many forms are accepted, but the
easiest is the name of the stage. For example, if we have
|
to |
an indexing parameter. If |
verbose |
logical. Whether or not to display pretty colored text informing about stage progress. nested list of logicals. |
remember_flag |
logical. An internal argument used by |
mode |
character. If |
normalized |
logical. A convenience recursion performance helper. If
|
.depth |
integer. Internal parameter for keeping track of nested execution depth. |
... |
Any additional arguments to delegate to the |
TRUE or FALSE according as running the stages specified by the
from
and to
keys succeeded or failed. If
remember = TRUE
, this will instead be a list of the environment
before and after executing the aforementioned stages. (This allows
comparing what changes were made to the context
during the
execution of the stageRunner.)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | env <- new.env()
some_fn <- function(e) e$x <- 1
other_fn <- function(e) e$y <- 1
another_fn <- function(e) e$z <- 1
sr <- stagerunner(env, list(stage_one =
stagerunner(env, list(substage_one = some_fn, substage_two = other_fn)),
stage_two = another_fn))
# Here, the following all execute only substage_two:
sr$run(list(list(FALSE, TRUE), FALSE))
sr$run(list(list(1, 2)))
sr$run('stage_one/substage_two')
sr$run('one/two')
stopifnot(is.null(env$z), is.null(env$x), identical(env$y, 1))
# This will execute all but "stage_one" (i.e., only "stage_two")
sr$run(-1)
stopifnot(identical(env$z, 1))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.