Download files from a Zenodo deposit
Arguments
- list_deposit
data.frame or tibble. Obtained with list_deposit.
- file_name
character. If
NULL
, all files from the file list. If a file name is specified, only this file will be downloaded.- dest
character. Destination folder.
- quiet
logical. Show download info and progress bar.
Examples
res <- list_deposit(deposit_id = 10959197)
temp_dir <- tempdir()
download_deposit(list_deposit = res, dest = temp_dir, quiet = FALSE)
#> # A tibble: 5 × 10
#> success status_code resumefrom url destfile error type modified
#> <lgl> <int> <dbl> <chr> <chr> <chr> <chr> <dttm>
#> 1 TRUE 200 0 https… /tmp/Rt… NA appl… NA
#> 2 TRUE 200 0 https… /tmp/Rt… NA appl… NA
#> 3 TRUE 200 0 https… /tmp/Rt… NA appl… NA
#> 4 TRUE 200 0 https… /tmp/Rt… NA appl… NA
#> 5 TRUE 200 0 https… /tmp/Rt… NA appl… NA
#> # ℹ 2 more variables: time <dbl>, headers <list>
file.exists(file.path(temp_dir, "iris.rds"))
#> [1] TRUE
file.exists(file.path(temp_dir, "mtcars.rds"))
#> [1] TRUE