Learn R Programming

spocc (version 0.8.0)

as.antweb: Coerce occurrence keys to antwebkey/occkey objects

Description

Coerce occurrence keys to antwebkey/occkey objects

Usage

as.antweb(x, ...)

Arguments

x

Various inputs, including the output from a call to occ() (class occdat), occ2df() (class data.frame), or a list, numeric, character, or antwebkey, or occkey.

...

curl options; named parameters passed on to crul::HttpClient()

Value

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

Examples

Run this code
# NOT RUN {
spp <- c("linepithema humile", "acanthognathus")
out <- occ(query=spp, from='antweb', limit=2)
res <- occ2df(out)
(tt <- as.antweb(out))
(uu <- as.antweb(res))
as.antweb(res$key[1])
as.antweb(as.list(res$key[1:2]))
as.antweb(tt[[1]])
as.antweb(uu[[1]])
as.antweb(tt[1:2])
# }

Run the code above in your browser using DataLab