occ_download_get: Get a download from GBIF.

View source: R/occ_download_get.r

occ_download_getR Documentation

Get a download from GBIF.

Description

Get a download from GBIF.

Usage

occ_download_get(key, path = ".", overwrite = FALSE, ...)

Arguments

key

A key generated from a request, like that from occ_download

path

Path to write zip file to. Default: ".", with a .zip appended to the end.

overwrite

Will only overwrite existing path if TRUE.

...

named curl options passed on to crul::verb-GET. see curl::curl_options() for curl options

Details

Downloads the zip file to a directory you specify on your machine. crul::HttpClient() is used internally to write the zip file to disk. See crul::writing-options. This function only downloads the file. See occ_download_import to open a downloaded file in your R session. The speed of this function is of course proportional to the size of the file to download. For example, a 58 MB file on my machine took about 26 seconds.

Note

see downloads for an overview of GBIF downloads methods

This function used to check for HTTP response content type, but it has changed enough that we no longer check it. If you run into issues with this function, open an issue in the GitHub repository.

See Also

Other downloads: download_predicate_dsl, occ_download_cached(), occ_download_cancel(), occ_download_dataset_activity(), occ_download_datasets(), occ_download_import(), occ_download_list(), occ_download_meta(), occ_download_queue(), occ_download_wait(), occ_download()

Examples

## Not run: 
occ_download_get("0000066-140928181241064")
occ_download_get("0003983-140910143529206", overwrite = TRUE)

## End(Not run)

rgbif documentation built on Sept. 11, 2023, 9:06 a.m.