as.obis: Coerce occurrence keys to obis id objects

View source: R/as.obis.R

as.obisR Documentation

Coerce occurrence keys to obis id objects

Description

Coerce occurrence keys to obis id objects

Usage

as.obis(x, ...)

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()

Value

One or more in a list of both class obiskey and occkey

See Also

Other coercion: as.ala(), as.gbif(), as.idigbio(), as.inat(), as.vertnet()

Examples

## Not run: 
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)

## End(Not run)

spocc documentation built on March 31, 2023, 9:59 p.m.