Download Argo data files

argo_download(path, download = NULL, async = NULL, quiet = FALSE)

argo_download_aux(path, download = NULL, async = TRUE, quiet = FALSE)

argo_should_download(
  path,
  max_global_cache_age = getOption("argodata.max_global_cache_age", Inf),
  max_data_cache_age = getOption("argodata.max_data_cache_age", Inf)
)

Arguments

path

A path relative to the root directory of argo_mirror() or argo_cache_dir(). This value can also be a data.frame with a file column (e.g., a global index as returned by argo_global_meta() and others).

download

A logical vector indicating whether or not a file should be downloaded. Defaults to the value of argo_should_download(), which is TRUE for files that do not exist in the cache.

async

Use TRUE to perform HTTP requests in parallel. This is much faster for large numbers of small files.

quiet

Use FALSE to show which files are downloaded and for more verbose error messages.

max_global_cache_age, max_data_cache_age

The maximum age in hours to keep cached files. Use Inf to always use cached files; use -Inf to always force download. You can set the default values of these using options(argodata.max_global_cache_age = ...) and/or options(argodata.max_data_cache_age = ...).

Value

A vector of cached filenames corresponding to path.