Learn R Programming

drake (version 5.0.0)

drake_config: Create the internal runtime parameter list used internally in make().

Description

This configuration list is also required for functions such as outdated() and vis_drake_graph(). It is meant to be specific to a single call to make(), and you should not modify it by hand afterwards. If you later plan to call make() with different arguments (especially targets), you should refresh the config list with another call to drake_config(). For changes to the targets argument specifically, it is important to recompute the config list to make sure the internal workflow network has all the targets you need. Modifying the targets element afterwards will have no effect and it could lead to false negative results from outdated()

Usage

drake_config(plan = drake_plan(), targets = drake::possible_targets(plan),
  envir = parent.frame(), verbose = 1, hook = default_hook,
  cache = drake::get_cache(verbose = verbose, force = force),
  fetch_cache = NULL, parallelism = drake::default_parallelism(),
  jobs = 1, packages = rev(.packages()), prework = character(0),
  prepend = character(0), command = drake::default_Makefile_command(),
  args = drake::default_Makefile_args(jobs = jobs, verbose = verbose),
  recipe_command = drake::default_recipe_command(), timeout = Inf,
  cpu = timeout, elapsed = timeout, retries = 0, force = FALSE,
  log_progress = FALSE, graph = NULL, trigger = drake::default_trigger(),
  imports_only = FALSE, skip_imports = FALSE, skip_safety_checks = FALSE,
  lazy_load = FALSE, session_info = TRUE, cache_log_file = NULL)

Arguments

plan

same as for make

targets

same as for make

envir

same as for make

verbose

same as for make

hook

same as for make

cache

same as for make

fetch_cache

same as for make

parallelism

same as for make

jobs

same as for make

packages

same as for make

prework

same as for make

prepend

same as for make

command

same as for make

args

same as for make

recipe_command

same as for make

timeout

same as for make

cpu

same as for make

elapsed

same as for make

retries

same as for make

force

same as for make

log_progress

logical, whether to clear the cached progress of the targets readable by

graph

igraph object representing the workflow plan network. Overrides skip_imports.

trigger

same as for make

imports_only

logical, whether to skip building the targets in plan and just import objects and files.

skip_imports

logical, whether to totally neglect to process the imports and jump straight to the targets. This can be useful if your imports are massive and you just want to test your project, but it is bad practice for reproducible data analysis. This argument is overridden if you supply your own graph argument.

skip_safety_checks

logical, whether to skip the safety checks on your workflow to save time. Use at your own peril.

lazy_load

same as for make

session_info

same as for make

cache_log_file

same as for make

Value

The master internal configuration list of a project.

See Also

make_with_config, make, drake_plan, vis_drake_graph

Examples

Run this code
# NOT RUN {
test_with_dir("Quarantine side effects.", {
load_basic_example() # Get the code with drake_example("basic").
# Construct the master internal configuration list.
con <- drake_config(my_plan)
# These functions are faster than otherwise
# because they use the configuration list.
outdated(config = con) # Which targets are out of date?
missed(config = con) # Which imports are missing?
# In make(..., jobs = n), it would be silly to set `n` higher than this:
max_useful_jobs(config = con)
# Show a visNetwork graph
vis_drake_graph(config = con)
# Get the underlying node/edge data frames of the graph.
dataframes_graph(config = con)
})
# }

Run the code above in your browser using DataLab