tar_cancel {targets} | R Documentation |
Cancel a target mid-execution under a custom condition.
Description
Cancel a target while its command is running if a condition is met.
Usage
tar_cancel(condition = TRUE)
Arguments
condition |
Logical of length 1, whether to cancel the target. |
Details
Must be invoked by the target itself. tar_cancel()
cannot interrupt a target from another process.
See Also
Other utilities:
tar_active()
,
tar_backoff()
,
tar_call()
,
tar_definition()
,
tar_described_as()
,
tar_envir()
,
tar_group()
,
tar_name()
,
tar_path()
,
tar_path_script()
,
tar_path_script_support()
,
tar_path_store()
,
tar_path_target()
,
tar_source()
,
tar_store()
Examples
if (identical(Sys.getenv("TAR_EXAMPLES"), "true")) { # for CRAN
tar_dir({ # tar_dir() runs code from a temp dir for CRAN.
tar_script(tar_target(x, tar_cancel(1 > 0)))
tar_make() # Should cancel target x.
})
}
[Package targets version 1.7.1 Index]