download_zenodo: download_zenodo

View source: R/zen4R_downloader.R

download_zenodoR Documentation

download_zenodo

Description

download_zenodo allows to download archives attached to a Zenodo record, identified by its DOI or concept DOI.

Usage

download_zenodo(
  doi,
  path = ".",
  files = list(),
  sandbox = FALSE,
  logger = NULL,
  quiet = FALSE,
  ...
)

Arguments

doi

a Zenodo DOI or concept DOI

path

the target directory where to download files

files

subset of filenames to restrain to download. If ignored, all files will be downloaded.

sandbox

Use the sandbox infrastructure. Default is FALSE

logger

a logger to print Zenodo API-related messages. The logger can be either NULL, "INFO" (with minimum logs), or "DEBUG" (for complete curl http calls logs)

quiet

Logical (FALSE by default). Do you want to suppress informative messages (not warnings)?

...

any other arguments for parallel downloading (more information at ZenodoRecord, downloadFiles() documentation)

Examples

## Not run: 
 #simple download (sequential)   
 download_zenodo("10.5281/zenodo.2547036")
 
 library(parallel)
 #download files as parallel using a cluster approach (for both Unix/Win systems)
 download_zenodo("10.5281/zenodo.2547036", 
   parallel = TRUE, parallel_handler = parLapply, cl = makeCluster(2))
 
 #download files as parallel using mclapply (for Unix systems)
 download_zenodo("10.5281/zenodo.2547036",
   parallel = TRUE, parallel_handler = mclapply, mc.cores = 2)

## End(Not run)
                

zen4R documentation built on June 22, 2024, 11:43 a.m.