Learn R Programming

targets (version 0.0.0.9000)

tar_validate: Validate a pipeline of targets.

Description

Inspect the pipeline for issues and throw an error or warning if a problem is detected.

Usage

tar_validate(callr_function = callr::r, callr_arguments = list())

Arguments

callr_function

A function from callr to start a fresh clean R process to do the work. Set to NULL to run in the current session instead of an external process (but restart your R session just before you do in order to clear debris out of the global environment). callr_function needs to be NULL for interactive debugging, e.g. tar_option_set(debug = "your_target"). However, callr_function should not be NULL for serious reproducible work.

callr_arguments

A list of arguments to callr_function.

Value

NULL except if callr_function = callr::r_bg(), in which case a handle to the callr background process is returned. Either way, the value is invisibly returned.

Examples

Run this code
# NOT RUN {
tar_dir({
tar_script(tar_pipeline(tar_target(x, 1 + 1)))
tar_validate()
})
# }

Run the code above in your browser using DataLab