
Cancel a target while its command is running if a condition is met.
tar_cancel(condition = TRUE)
Logical of length 1, whether to cancel the target.
Must be invoked by the target itself. tar_cancel()
cannot interrupt a target from another process.
Other utilities:
tar_envir()
,
tar_group()
,
tar_name()
,
tar_path()
,
tar_seed()
,
tar_timestamp_raw()
,
tar_timestamp()
# NOT RUN {
if (identical(Sys.getenv("TAR_LONG_EXAMPLES"), "true")) {
tar_dir({ # tar_dir() runs code from a temporary directory.
tar_script(tar_target(x, tar_cancel(1 > 0)))
tar_make() # Should cancel target x.
})
}
# }
Run the code above in your browser using DataLab