drake (version 6.2.1)

check_plan: Check a workflow plan data frame for obvious errors.

Description

Possible obvious errors include circular dependencies and missing input files.

Usage

check_plan(plan = read_drake_plan(), targets = NULL,
  envir = parent.frame(), cache = drake::get_cache(verbose = verbose),
  verbose = drake::default_verbose(), jobs = 1)

Arguments

plan

workflow plan data frame, possibly from drake_plan().

targets

character vector of targets to make

envir

environment containing user-defined functions

cache

optional drake cache. See new_cache().

verbose

logical or numeric, control printing to the console. Use pkgconfig to set the default value of verbose for your R session: for example, pkgconfig::set_config("drake::verbose" = 2).

  • 0 or FALSE: print nothing.

  • 1 or TRUE: print only targets to build.

  • 2: also print checks and cache info.

  • 3: also print any potentially missing items.

  • 4: also print imports and writes to the cache.

jobs

number of jobs/workers for parallel processing

Value

Invisibly return plan.

See Also

drake_plan(), make()

Examples

Run this code
# NOT RUN {
test_with_dir("Quarantine side effects.", {
load_mtcars_example() # Get the code with drake_example("mtcars").
check_plan(my_plan) # Check the workflow plan dataframe for obvious errors.
unlink("report.Rmd") # Remove an import file mentioned in the plan.
# If you un-suppress the warnings, check_plan()
# will tell you that 'report.Rmd' is missing.
suppressWarnings(check_plan(my_plan))
})
# }

Run the code above in your browser using DataLab