| tar_call | R Documentation |
targets function.Get the name of the currently running targets
interface function. Returns NULL if not invoked inside
a target or _targets.R (i.e. if not directly invoked
by tar_make(), tar_visnetwork(), etc.).
tar_call()
Character of length 1, name of the currently running targets
interface function. For example, suppose you have a call to
tar_call() inside a target or _targets.R. Then if you run
tar_make(), tar_call() will return "tar_make".
Other utilities:
tar_active(),
tar_backoff(),
tar_cancel(),
tar_definition(),
tar_described_as(),
tar_envir(),
tar_format_get(),
tar_group(),
tar_name(),
tar_path(),
tar_path_script(),
tar_path_script_support(),
tar_path_store(),
tar_path_target(),
tar_source(),
tar_store(),
tar_unblock_process()
if (identical(Sys.getenv("TAR_EXAMPLES"), "true")) { # for CRAN
tar_dir({ # tar_dir() runs code from a temp dir for CRAN.
tar_call() # NULL
tar_script({
library(targets)
library(tarchetypes)
message("called function: ", tar_call())
tar_target(x, tar_call())
})
tar_manifest() # prints "called function: tar_manifest"
tar_make() # prints "called function: tar_make"
tar_read(x) # "tar_make"
})
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.