download local metadata files to the cloud location
(repository, bucket, and prefix) you set in
tar_option_set()
in _targets.R
.
Usage
tar_meta_download(
meta = TRUE,
progress = TRUE,
process = TRUE,
crew = TRUE,
verbose = TRUE,
strict = FALSE,
script = targets::tar_config_get("script"),
store = targets::tar_config_get("store")
)
Arguments
- meta
Logical of length 1, whether to process the main metadata file at
_targets/meta/meta
.- progress
Logical of length 1, whether to process the progress file at
_targets/meta/progress
.- process
Logical of length 1, whether to process the process file at
_targets/meta/process
.- crew
Logical of length 1, whether to process the
crew
file at_targets/meta/crew
. Only exists if runningtargets
withcrew
.- verbose
Logical of length 1, whether to print informative console messages.
- strict
Logical of length 1.
TRUE
to error out if the file does not exist in the bucket,FALSE
to proceed without an error or warning. Ifstrict
isFALSE
andverbose
isTRUE
, then an informative message will print to the R console.- script
Character of length 1, path to the target script file. Defaults to
tar_config_get("script")
, which in turn defaults to_targets.R
. When you set this argument, the value oftar_config_get("script")
is temporarily changed for the current function call. Seetar_script()
,tar_config_get()
, andtar_config_set()
for details about the target script file and how to set it persistently for a project.- store
Character of length 1, path to the
targets
data store. Defaults totar_config_get("store")
, which in turn defaults to_targets/
. When you set this argument, the value oftar_config_get("store")
is temporarily changed for the current function call. Seetar_config_get()
andtar_config_set()
for details about how to set the data store path persistently for a project.
See also
Other metadata:
tar_meta()
,
tar_meta_delete()
,
tar_meta_sync()
,
tar_meta_upload()
Examples
if (identical(Sys.getenv("TAR_EXAMPLES"), "true")) { # for CRAN
tar_dir({ # tar_dir() runs code from a temp dir for CRAN.
tar_script({
library(targets)
library(tarchetypes)
tar_option_set(
resources = tar_resources(
aws = tar_resources_aws(
bucket = "YOUR_BUCKET_NAME",
prefix = "YOUR_PROJECT_NAME"
)
),
repository = "aws"
)
list(
tar_target(x, data.frame(x = seq_len(2), y = seq_len(2)))
)
})
tar_make()
tar_meta_download()
})
}