Learn R Programming

rgbif (version 0.9.6)

occ_download_import: Import a downloaded file from GBIF.

Description

Import a downloaded file from GBIF.

Usage

occ_download_import(x = NULL, key = NULL, path = ".")
as.download(path = ".", key = NULL)
"as.download"(path = ".", key = NULL)
"as.download"(path = ".", key = NULL)

Arguments

x
The output of a call to occ_download_get
key
A key generated from a request, like that from occ_download
path
Path to unzip file to. Default: "." Writes to folder matching zip file name

Details

You can provide either x as input, or both key and path. We use fread internally to read data.

Examples

Run this code
## Not run: 
# # First, kick off at least 1 download, then wait for the job to be complete
# # Then use your download keys
# res <- occ_download_get(key="0000066-140928181241064", overwrite=TRUE)
# occ_download_import(x=res)
# 
# occ_download_get(key="0000066-140928181241064", overwrite = TRUE) %>% occ_download_import
# 
# # coerce a file path to the right class to feed to occ_download_import
# as.download("0000066-140928181241064.zip")
# as.download(key = "0000066-140928181241064")
# occ_download_import(as.download("0000066-140928181241064.zip"))
# ## End(Not run)

Run the code above in your browser using DataLab