as.idigbio: Coerce occurrence keys to idigbio objects

Description Usage Arguments Details Value Examples

View source: R/as.idigbio.R

Description

Coerce occurrence keys to idigbio objects

Usage

1

Arguments

x

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

...

curl options; named parameters passed on to httr::GET()

Details

Internally, we use idig_view_records, whereas we use idig_search_records() in the occ() function.

Value

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

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
## Not run: 
spnames <- c('Accipiter striatus', 'Setophaga caerulescens',
  'Spinus tristis')
out <- occ(query=spnames, from='idigbio', limit=2)
res <- occ2df(out)
(tt <- as.idigbio(out))
(uu <- as.idigbio(res))
as.idigbio(res$key[1])
as.idigbio(as.list(res$key[1:2]))
as.idigbio(tt[[1]])
as.idigbio(uu[[1]])
as.idigbio(tt[1:2])

library("dplyr")
bind_rows(lapply(tt, function(x) data.frame(unclass(x)$data)))

## End(Not run)

spocc documentation built on May 30, 2017, 1:06 a.m.