Learn R Programming

drake (version 7.5.2)

failed: List failed targets. to make().

Description

Together, functions failed() and diagnose() should eliminate the strict need for ordinary error messages printed to the console.

Usage

failed(path = NULL, search = NULL, cache = drake::drake_cache(path =
  path, verbose = verbose), verbose = 1L, upstream_only = NULL)

Arguments

path

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

search

Deprecated.

cache

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

verbose

Integer, control printing to the console/terminal.

  • 0: print nothing.

  • 1: print targets, retries, and failures.

  • 2: also show a spinner when preprocessing tasks are underway.

upstream_only

Deprecated.

Value

A character vector of target names.

See Also

running(), make()

Examples

Run this code
# 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
failed(cache = cache) # "x"
e <- diagnose(x, cache = cache) # Retrieve the cached error log of x.
names(e)
e$error
names(e$error)
}
})
# }

Run the code above in your browser using DataLab