driver: driver

View source: R/driver.R

driverR Documentation

driver

Description

Run the entire data system.

Usage

driver(
  all_data = empty_data(),
  stop_before = NULL,
  stop_after = NULL,
  return_inputs_of = stop_before,
  return_outputs_of = stop_after,
  return_data_names = union(inputs_of(return_inputs_of), outputs_of(return_outputs_of)),
  return_data_map_only = FALSE,
  write_outputs = !return_data_map_only,
  write_xml = write_outputs,
  outdir = OUTPUTS_DIR,
  xmldir = XML_DIR,
  quiet = FALSE,
  user_modifications = NULL,
  xml_suffix = NULL
)

Arguments

all_data

Data to be pre-loaded into data system

stop_before

Stop immediately before this chunk (character)

stop_after

Stop immediately after this chunk (character)

return_inputs_of

Return the data objects that are inputs for these chunks (character). If stop_before is specified, by default that chunk's inputs are returned

return_outputs_of

Return the data objects that are output from these chunks (character) If stop_after is specified, by default that chunk's outputs are returned

return_data_names

Return these data objects (character). By default this is the union of return_inputs_of and return_outputs_of

return_data_map_only

Return only the precursor information? (logical) This overrides the other return_* parameters above

write_outputs

Write all chunk outputs to disk?

write_xml

Write XML Batch chunk outputs to disk?

outdir

Location to write output data (ignored if write_outputs is FALSE)

xmldir

Location to write output XML (ignored if write_outputs is FALSE)

quiet

Suppress output?

user_modifications

A list of function names which implement a user mod chunk. See vignettes/usermod_vignette.Rmd for more details and examples.

xml_suffix

A suffix to be appended at the end of all XML file name if not null. Such a feature is useful when using user_modifications to generate alternative scenarios.

Details

The driver loads any necessary data from input files, runs all code chunks in an order dictated by their dependencies, does error-checking, and writes outputs. For more details, see the relevant wiki page at https://github.com/bpbond/gcamdata/wiki/Driver.

Value

A list of all built data (or a data map tibble if requested).

Author(s)

BBL


JGCRI/gcamdata documentation built on March 21, 2023, 2:19 a.m.