Coerce occurrence keys to iNaturalist id objects
Arguments
- x
Various inputs, including the output from a call to
occ()
(class occdat),occ2df()
(class data.frame), or a list, numeric, character, inatkey, or occkey.- ...
curl options; named parameters passed on to
crul::HttpClient()
See also
Other coercion:
as.ala()
,
as.gbif()
,
as.idigbio()
,
as.obis()
,
as.vertnet()
Examples
if (FALSE) { # \dontrun{
spnames <- c('Accipiter striatus', 'Setophaga caerulescens',
'Spinus tristis')
out <- occ(query=spnames, from='inat', limit=2)
res <- occ2df(out)
(tt <- as.inat(out))
(uu <- as.inat(res))
as.inat(res$key[1])
as.inat(as.list(res$key[1:2]))
as.inat(tt[[1]])
as.inat(uu[[1]])
as.inat(tt[1:2])
} # }