drake (version 6.2.1)

build_drake_graph: Deprecated function build_drake_graph

Description

Use drake_config() instead.

Usage

build_drake_graph(plan = read_drake_plan(), targets = plan$target,
  envir = parent.frame(), verbose = drake::default_verbose(),
  jobs = 1, sanitize_plan = FALSE, console_log_file = NULL,
  trigger = drake::trigger(), cache = NULL)

Arguments

plan

workflow plan data frame. A workflow plan data frame is a data frame with a target column and a command column. (See the details in the drake_plan() help file for descriptions of the optional columns.) Targets are the objects and files that drake generates, and commands are the pieces of R code that produce them. Use the function drake_plan() to generate workflow plan data frames easily, and see functions plan_analyses(), plan_summaries(), evaluate_plan(), expand_plan(), and gather_plan() for easy ways to generate large workflow plan data frames.

targets

character vector, names of targets to build. Dependencies are built too. Together, the plan and targets comprise the workflow network (i.e. the graph argument). Changing either will change the network.

envir

environment to use. Defaults to the current workspace, so you should not need to worry about this most of the time. A deep copy of envir is made, so you don't need to worry about your workspace being modified by make. The deep copy inherits from the global environment. Wherever necessary, objects and functions are imported from envir and the global environment and then reproducibly tracked as dependencies.

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

maximum number of parallel workers for processing the targets. If you wish to parallelize the imports and preprocessing as well, you can use a named numeric vector of length 2, e.g. make(jobs = c(imports = 4, targets = 8)). make(jobs = 4) is equivalent to make(jobs = c(imports = 1, targets = 4)).

Windows users should not set jobs > 1 if parallelism is "mclapply" because mclapply() is based on forking. Windows users who use parallelism = "Makefile" will need to download and install Rtools.

You can experiment with predict_runtime() to help decide on an appropriate number of jobs. For details, visit https://ropenscilabs.github.io/drake-manual/time.html.

sanitize_plan

deprecated

console_log_file

character scalar, connection object (such as stdout()) or NULL. If NULL, console output will be printed to the R console using message(). If a character scalar, console_log_file should be the name of a flat file, and console output will be appended to that file. If a connection object (e.g. stdout()) warnings and messages will be sent to the connection. For example, if console_log_file is stdout(), warnings and messages are printed to the console in real time (in addition to the usual in-bulk printing after each target finishes).

trigger

Name of the trigger to apply to all targets. Ignored if plan has a trigger column. See trigger() for details.

cache

drake cache as created by new_cache(). See also get_cache() and this_cache().

Value

An igraph object.

Details

Deprecated on 2018-11-02.

Examples

Run this code
# NOT RUN {
# See ?drake_config for examples.
# }

Run the code above in your browser using DataLab