tar_destroy | R Documentation |
Destroy the data store written by the pipeline.
tar_destroy( destroy = c("all", "cloud", "local", "meta", "process", "progress", "objects", "scratch", "workspaces", "user"), ask = NULL, store = targets::tar_config_get("store") )
destroy |
Character of length 1, what to destroy. Choices:
|
ask |
Logical of length 1, whether to pause with a menu prompt
before deleting files. To disable this menu, set the |
store |
Character of length 1, path to the
|
The data store is a folder created by tar_make()
(or tar_make_future()
or tar_make_clustermq()
).
The details of the data store are explained at
https://books.ropensci.org/targets/data.html#local-data-store.
The data store folder contains the output data
and metadata of the targets in the pipeline. Usually,
the data store is a folder called _targets/
(see tar_config_set()
to customize), and it may
link to data on the cloud if you used AWS or GCP
buckets. By default, tar_destroy()
deletes the entire
_targets/
folder (or wherever the data store is located),
including custom user-supplied files in _targets/user/
,
as well as any cloud data that the pipeline uploaded.
See the destroy
argument to customize this behavior
and only delete part of the data store, and see functions like
tar_invalidate()
, tar_delete()
, and tar_prune()
to remove
information pertaining to some but not all targets in the pipeline.
After calling tar_destroy()
with default arguments,
the entire data store is gone, which means all the output data from
previous runs of the pipeline is gone (except for
input/output files tracked with tar_target(..., format = "file")
).
The next run of the pipeline will start from scratch,
and it will not skip any targets.
NULL
(invisibly).
Other clean:
tar_delete()
,
tar_invalidate()
,
tar_prune()
if (identical(Sys.getenv("TAR_EXAMPLES"), "true")) { tar_dir({ # tar_dir() runs code from a temporary directory. tar_script(list(tar_target(x, 1 + 1)), ask = FALSE) tar_make() # Creates the _targets/ data store. tar_destroy() print(file.exists("_targets")) # Should be FALSE. }) }
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.