Coerce occurrence keys to vertnetkey/occkey objects
Details
Internally, we use rvertnet::vert_id()
, whereas occ()
uses rvertnet::vertsearch()
.
See also
Other coercion:
as.ala()
,
as.gbif()
,
as.idigbio()
,
as.inat()
,
as.obis()
Examples
if (FALSE) { # \dontrun{
# spnames <- c('Accipiter striatus', 'Setophaga caerulescens',
# 'Spinus tristis')
# out <- occ(query=spnames, from='vertnet', has_coords=TRUE, limit=2)
# res <- occ2df(out)
# (tt <- as.vertnet(out))
# (uu <- as.vertnet(res))
# keys <- Filter(Negate(is.na), res$key)
# as.vertnet(keys[1])
# as.vertnet(as.list(keys[1:2]))
# as.vertnet(tt[[1]])
# as.vertnet(uu[[1]])
# as.vertnet(tt[1:2])
} # }