Learn R Programming

bold (version 0.3.0)

bold_tax_id: Search BOLD for taxonomy data by BOLD ID.

Description

Search BOLD for taxonomy data by BOLD ID.

Usage

bold_tax_id(id = NULL, dataTypes = "basic", includeTree = FALSE,
  response = FALSE, ...)

Arguments

id
(integer) One or more BOLD taxonomic identifiers
dataTypes
(character) Specifies the datatypes that will be returned. 'all' returns all data. 'basic' returns basic taxon information. 'images' returns specimen images.
includeTree
(logical) If TRUE (default: FALSE), returns a list containing information for parent taxa as well as the specified taxon.
response
(logical) Note that response is the object that returns from the Curl call, useful for debugging, and getting detailed info on the API call.
...
Further args passed on to httr::GET, main purpose being curl debugging

References

http://boldsystems.org/index.php/resources/api?type=taxonomy#idParameters

See Also

bold_tax_name

Examples

Run this code
bold_tax_id(id=88899)
bold_tax_id(id=88899, includeTree=TRUE)
bold_tax_id(id=88899, includeTree=TRUE, dataTypes = "stats")
bold_tax_id(id=c(88899,125295))

## dataTypes parameter
bold_tax_id(id=88899, dataTypes = "basic")
bold_tax_id(id=88899, dataTypes = "stats")
bold_tax_id(id=88899, dataTypes = "images")
bold_tax_id(id=88899, dataTypes = "geo")
bold_tax_id(id=88899, dataTypes = "sequencinglabs")
bold_tax_id(id=88899, dataTypes = "depository")
bold_tax_id(id=88899, dataTypes = "thirdparty")
bold_tax_id(id=88899, dataTypes = "all")
bold_tax_id(id=c(88899,125295), dataTypes = "geo")
bold_tax_id(id=c(88899,125295), dataTypes = "images")

## Passing in NA
bold_tax_id(NA, response=TRUE)
bold_tax_id(id = NA)
bold_tax_id(id = c(88899,125295,NA))

## get httr response object only
bold_tax_id(id=88899, response=TRUE)
bold_tax_id(id=c(88899,125295), response=TRUE)

## curl debugging
library('httr')
bold_tax_id(id=88899, config=verbose())

Run the code above in your browser using DataLab