scripted: Run scripts based on .yaml instructions

Description Usage Arguments Details Value

Description

An instructions file is a .yaml file that is loaded as an R 'list'. It contains two top-level elements: "defaults", and "runs". The "defaults" element is a list describing a single script to run. The "runs" element is a list of lists. Each item in this list describes a single script to run. So:

Usage

1
2
scripted(file, target_dir = ".", log_file = tempfile(),
  debug = FALSE)

Arguments

file

.yaml file with instructions, see example

log_file

where to write text log to.

Details

defaults: [RUN DEFAULTS]

runs: - [RUN A] - [RUN B]

Before each run is ... run... the run-specific data is merged on top of the run defaults using purrr::list_merge.

The elements of a run are:

- name : the name of the script to run (without its extension). - parameters : (optional) a list where any script-specific control data can be placed. - source_dir : a vector of strings, one per directory to search for resources (data files _and_ scripts). - dependencies : a vector of strings, one per file required for the script to run. If a dependency is update the script is re-run. - target_dir : the root of the directory where script outptu will be saved, a single string. - outputs :

Value

log_file where logs were written.


sakrejda/scripted documentation built on May 9, 2019, 7:38 a.m.