as.gbif | R Documentation |
Coerce occurrence keys to gbifkey/occkey objects
as.gbif(x, ...)
x |
Various inputs, including the output from a call to
|
... |
curl options; named parameters passed on to |
Internally, we use rgbif::occ_get()
, whereas
occ()
uses rgbif::occ_data()
. We can use
rgbif::occ_get()
here because we have the occurrence key to
go directly to the occurrence record.
One or more in a list of both class gbifkey and occkey
Other coercion:
as.ala()
,
as.idigbio()
,
as.inat()
,
as.obis()
,
as.vertnet()
## Not run:
spnames <- c('Accipiter striatus', 'Setophaga caerulescens',
'Spinus tristis')
out <- occ(query=spnames, from=c('gbif','ebird'),
gbifopts=list(hasCoordinate=TRUE), limit=2)
res <- occ2df(out)
(tt <- as.gbif(out))
(uu <- as.gbif(res))
as.gbif(as.numeric(res$key[1]))
as.gbif(res$key[1])
as.gbif(as.list(res$key[1:2]))
as.gbif(tt[[1]])
as.gbif(uu[[1]])
as.gbif(tt[1:2])
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.