drake (version 6.2.1)

build_graph: Deprecated function build_graph

Description

Use drake_config() instead.

Usage

build_graph(plan = read_drake_plan(), targets = plan$target,
  envir = parent.frame(), verbose = 1, jobs = 1)

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.

Details

Deprecated on 2017-11-12.

Examples

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

Run the code above in your browser using DataCamp Workspace