recoverable {drake} | R Documentation |
List the most upstream recoverable outdated targets.
Description
Only shows the most upstream updated targets.
Whether downstream targets are recoverable depends on
the eventual values of the upstream targets in the next make()
.
Usage
recoverable(..., make_imports = TRUE, do_prework = TRUE, config = NULL)
Arguments
... |
Arguments to |
make_imports |
Logical, whether to make the imports first.
Set to |
do_prework |
Whether to do the |
config |
Deprecated (2019-12-21).
A configured workflow from |
Value
Character vector of the names of recoverable targets.
Recovery
make(recover = TRUE, recoverable = TRUE)
powers automated data recovery.
The default of recover
is FALSE
because
targets recovered from the distant past may have been generated
with earlier versions of R and earlier package environments
that no longer exist.
How it works: if recover
is TRUE
,
drake
tries to salvage old target values from the cache
instead of running commands from the plan.
A target is recoverable if
There is an old value somewhere in the cache that shares the command, dependencies, etc. of the target about to be built.
The old value was generated with
make(recoverable = TRUE)
.
If both conditions are met, drake
will
Assign the most recently-generated admissible data to the target, and
skip the target's command.
See Also
r_recoverable()
, r_outdated()
, drake_config()
, missed()
,
drake_plan()
, make()
Examples
## Not run:
isolate_example("Quarantine side effects.", {
if (suppressWarnings(require("knitr"))) {
load_mtcars_example() # Get the code with drake_example("mtcars").
make(my_plan)
clean()
outdated(my_plan) # Which targets are outdated?
recoverable(my_plan) # Which of these are recoverable and upstream?
# The report still builds because clean() removes report.md,
# but make() recovers the rest.
make(my_plan, recover = TRUE)
outdated(my_plan)
# When was the *recovered* small data actually built (first stored)?
# (Was I using a different version of R back then?)
diagnose(small)$date
# If you set the same seed as before, you can even
# rename targets without having to build them again.
# For an example, see
# the "Reproducible data recovery and renaming" section of
# https://github.com/ropensci/drake/blob/main/README.md.
}
})
## End(Not run)