| tar_igraph | R Documentation |
Return an igraph object with the dependency graph of the pipeline.
tar_igraph(
targets_only = FALSE,
callr_function = callr::r,
callr_arguments = targets::tar_callr_args_default(callr_function),
envir = parent.frame(),
script = targets::tar_config_get("script")
)
targets_only |
|
callr_function |
A function from |
callr_arguments |
A list of arguments to |
envir |
An environment, where to run the target R script
(default: The |
script |
Character of length 1, path to the
target script file. Defaults to |
If you have igraph >= 2.2.0 installed, then you can debug
cycles in your pipeline by running igraph::find_cycle(tar_igraph()).
This helps detect cycles in the dependency graph of the pipeline.
A cycle happens when a target directly or indirectly depends on itself,
which is not allowed. igraph::find_cycle() returns a character vector
of the names of the targets and objects involved in the cycle
(if a cycle exists).
An igraph object with the dependency graph.
Other inspect:
tar_deps(),
tar_manifest(),
tar_network(),
tar_outdated(),
tar_sitrep(),
tar_validate()
if (identical(Sys.getenv("TAR_EXAMPLES"), "true")) { # for CRAN
tar_dir({ # tar_dir() runs code from a temp dir for CRAN.
tar_script(
list(
tar_target(x, 1),
tar_target(y, 2)
),
ask = FALSE
)
tar_igraph()
})
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.