Skip to contents

Waits for the download gbif_request() submitted, retrieves it, imports it and returns the records. A request too long for one GBIF query is split across several downloads, and all of them are waited for and stacked, so a sharded request is fetched the same way as a single one.

Usage

gbif_fetch(x, backmatch = TRUE, path = tempdir(), verbose = TRUE)

Arguments

x

What gbif_request(method = "download") returned.

backmatch

Logical. Attach the queried names with gbif_backmatch(). Default TRUE.

path

Directory to download into. Defaults to a session temp directory, so nothing is written outside it unless you ask.

verbose

Logical. Default TRUE.

Value

A data.frame of occurrence records, carrying the same keys, taxa, taxify_meta and gbif_download attributes as x, so cite() reports the backbone and every download DOI.

Examples

if (FALSE) { # \dontrun{
dl <- gbif_request(c("Quercus robur", "Bellis perennis"))
recs <- gbif_fetch(dl)
cite(recs)
} # }