drake_failed {drake}R Documentation

List failed targets. [Stable]

Description

List the targets that quit in error during make().

Usage

drake_failed(cache = drake::drake_cache(path = path), path = NULL)

Arguments

cache

drake cache. See new_cache(). If supplied, path is ignored.

path

Path to a drake cache (usually a hidden ⁠.drake/⁠ folder) or NULL.

Value

A character vector of target names.

See Also

drake_done(), drake_running(), drake_cancelled(), drake_progress(), make()

Examples

## Not run: 
isolate_example("contain side effects", {
if (suppressWarnings(require("knitr"))) {
# Build a plan doomed to fail:
bad_plan <- drake_plan(x = function_doesnt_exist())
cache <- storr::storr_environment() # optional
try(
  make(bad_plan, cache = cache, history = FALSE),
  silent = TRUE
) # error
drake_failed(cache = cache) # "x"
e <- diagnose(x, cache = cache) # Retrieve the cached error log of x.
names(e)
e$error
names(e$error)
}
})

## End(Not run)

[Package drake version 7.13.10 Index]