Coerce occurrence keys to obis id objects
Arguments
- x
Various inputs, including the output from a call to
occ()
(class occdat),occ2df()
(class data.frame), or a list, numeric, obiskey, or occkey.- ...
curl options; named parameters passed on to
crul::HttpClient()
See also
Other coercion:
as.ala()
,
as.gbif()
,
as.idigbio()
,
as.inat()
,
as.vertnet()
Examples
if (FALSE) { # \dontrun{
spnames <- c('Mola mola', 'Loligo vulgaris', 'Stomias boa')
out <- occ(query=spnames, from='obis', limit=2)
(res <- occ2df(out))
(tt <- as.obis(out))
(uu <- as.obis(res))
as.obis(x = res$key[1])
as.obis(as.list(res$key[1:2]))
as.obis(tt[[1]])
as.obis(uu[[1]])
as.obis(tt[1:2])
library("data.table")
rbindlist(lapply(tt, "[[", "results"),
use.names = TRUE, fill = TRUE)
} # }