Check for downloads already in your GBIF account
Source:R/occ_download_cached.R
occ_download_cached.Rd
Check for downloads already in your GBIF account
Usage
occ_download_cached(
...,
body = NULL,
type = "and",
format = "DWCA",
user = NULL,
pwd = NULL,
email = NULL,
refresh = FALSE,
age = 30,
curlopts = list()
)
Arguments
- ...
For
occ_download()
andocc_download_prep()
, one or more objects of classocc_predicate
orocc_predicate_list
, created bypred*
functions (see download_predicate_dsl). If you use this, don't usebody
parameter.- body
if you prefer to pass in the payload yourself, use this parameter. If you use this, don't pass anything to the dots. Accepts either an R list, or JSON. JSON is likely easier, since the JSON library jsonlite requires that you unbox strings that shouldn't be auto-converted to arrays, which is a bit tedious for large queries. optional
- type
(character) One of equals (=), and (&), or (|), lessThan (<), lessThanOrEquals (<=), greaterThan (>), greaterThanOrEquals (>=), in, within, not (!), like, isNotNull
- format
(character) The download format. One of 'DWCA' (default), 'SIMPLE_CSV', or 'SPECIES_LIST'
- user
(character) User name within GBIF's website. Required. See "Authentication" below
- pwd
(character) User password within GBIF's website. Required. See "Authentication" below
(character) Email address to receive download notice done email. Required. See "Authentication" below
- refresh
(logical) refresh your list of downloads. on the first request of each R session we'll cache your stored GBIF occurrence downloads locally. you can refresh this list by setting
refresh=TRUE
; if you're in the same R session, and you've done many download requests, then refreshing may be a good idea if you're using this function- age
(integer) number of days after which you want a new download. default: 30
- curlopts
list of named curl options passed on to
HttpClient
. seecurl::curl_options
for curl options
Note
see downloads for an overview of GBIF downloads methods
See also
Other downloads:
download_predicate_dsl
,
occ_download_cancel()
,
occ_download_dataset_activity()
,
occ_download_datasets()
,
occ_download_get()
,
occ_download_import()
,
occ_download_list()
,
occ_download_meta()
,
occ_download_queue()
,
occ_download_wait()
,
occ_download()
Examples
if (FALSE) { # \dontrun{
# these are examples from the package maintainer's account;
# outcomes will vary by user
occ_download_cached(pred_gte("elevation", 12000L))
occ_download_cached(pred("catalogNumber", 217880))
occ_download_cached(pred_gte("decimalLatitude", 65),
pred_lte("decimalLatitude", -65), type="or")
occ_download_cached(pred_gte("elevation", 12000L))
occ_download_cached(pred_gte("elevation", 12000L), refresh = TRUE)
} # }