drake (version 7.3.0)

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 = getwd(), search = TRUE, cache = drake::get_cache(path =
  path, search = search, verbose = verbose), verbose = 1L,
  upstream_only = NULL)

Arguments

path

Root directory of the drake project, or if search is TRUE, either the project root or a subdirectory of the project. Ignored if a cache is supplied.

search

Logical. If TRUE, search parent directories to find the nearest drake cache. Otherwise, look in the current working directory only. Ignored if a cache is supplied.

cache

drake cache. See new_cache(). If supplied, path and search are 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("Quarantine side effects.", {
if (suppressWarnings(require("knitr"))) {
load_mtcars_example() # Get the code with drake_example("mtcars").
make(my_plan) # Run the project, build the targets.
failed() # Should show that no targets failed.
# Build a workflow plan doomed to fail:
bad_plan <- drake_plan(x = function_doesnt_exist())
try(make(bad_plan), silent = TRUE) # error
failed() # "x"
diagnose(x) # Retrieve the cached error log of x.
}
})
# }

Run the code above in your browser using DataLab