rgbif (version 1.0.2)

GbifQueue: GBIF download queue

Description

GBIF download queue

Arguments

...

any number of occ_download() requests

.list

any number of occ_download() requests as lazy objects, called with e.g., lazyeval::lazy()

Details

Methods

add(x)

Add single jobs to the queue

add_all()

Add all jobs to the queue

remove(x)

Remove a job from the queue

jobs()

Give number of jobs in the queue

next_()

Get the next job in the queue. if no more jobs, returns empty list

last_()

Get the last job in the queue. if no more jobs, returns empty list

Examples

Run this code
# NOT RUN {
x <- GbifQueue$new(
  occ_download('taxonKey = 3119195', "year = 1976"),
  occ_download('taxonKey = 3119195', "year = 2001"),
  occ_download('taxonKey = 3119195', "year = 2001", "month <= 8"),
  occ_download('taxonKey = 3119195', "year = 2004"),
  occ_download('taxonKey = 3119195', "year = 2005")
)
que = x
x
x$reqs
x$add_all()
x$jobs()
x
x$remove(x$reqs[[1]])
x

# pre-prepared download request
z <- occ_download_prep(
  "basisOfRecord = HUMAN_OBSERVATION,OBSERVATION",
  "hasCoordinate = true",
  "hasGeospatialIssue = false",
  "year = 1993",
  user = "foo", pwd = "bar", email = "foo@bar.com"
)
out <- GbifQueue$new(.list = list(z))
out
out$reqs
# }

Run the code above in your browser using DataCamp Workspace