Learn R Programming

targets (version 0.4.1)

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 = targets::callr_args_default(callr_function)
)

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.

See Also

Other inspect: tar_deps_raw(), tar_deps(), tar_glimpse(), tar_manifest(), tar_network(), tar_outdated(), tar_sitrep(), tar_visnetwork()

Examples

Run this code
# NOT RUN {
if (identical(Sys.getenv("TAR_LONG_EXAMPLES"), "true")) {
tar_dir({ # tar_dir() runs code from a temporary directory.
tar_script(list(tar_target(x, 1 + 1)), ask = FALSE)
tar_validate()
})
}
# }

Run the code above in your browser using DataLab