View source: R/tar_traceback.R
tar_traceback | R Documentation |
Return the saved traceback of a target.
Assumes the target errored out in a previous run of the pipeline
with workspaces enabled for that target.
See tar_workspace()
for details.
tar_traceback(
name,
envir = NULL,
packages = NULL,
source = NULL,
characters = NULL,
store = targets::tar_config_get("store")
)
name |
Symbol, name of the target whose workspace to read. |
envir |
Deprecated in |
packages |
Logical, whether to load the required packages of the target. |
source |
Logical, whether to run the target script file
(default: |
characters |
Deprecated in |
store |
Character of length 1, path to the
|
Character vector, the traceback of a failed target if it exists.
Other debug:
tar_load_globals()
,
tar_workspace()
,
tar_workspaces()
if (identical(Sys.getenv("TAR_EXAMPLES"), "true")) { # for CRAN
tar_dir({ # tar_dir() runs code from a temp dir for CRAN.
tmp <- sample(1)
tar_script({
library(targets)
library(tarchetypes)
tar_option_set(workspace_on_error = TRUE)
list(
tar_target(x, "loaded"),
tar_target(y, stop(x))
)
}, ask = FALSE)
try(tar_make())
tar_traceback(y, characters = 60)
})
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.