Learn R Programming

taxize (version 0.0.5)

eol_hierarchy: Retrieve all taxonomic hierarchy from given EOL taxonID.

Description

Retrieve all taxonomic hierarchy from given EOL taxonID.

Usage

eol_hierarchy(taxonid, common_names = NULL,
    synonyms = NULL, usekey = FALSE,
    returntype = "data.frame",
    url = "http://www.eol.org/api/hierarchy_entries/1.0/",
    key = NULL)

Arguments

taxonid
the EOL page identifier (character)
common_names
Return common names or not (defaults to returning them, given commonnames=0 if not)
synonyms
Return synonyms or not (defaults to returning them, given synonyms=0 if not)
usekey
use your API key or not (TRUE or FALSE)
returntype
one of "list" of "data.frame" (character)
url
The EOL url for the function (should be left to default).
key
Your EOL API key; loads from .Rprofile.

Value

  • List or dataframe of XXXX.

Details

It's possible to return JSON or XML with the EOL API. However, this function only returns JSON for now.

Examples

Run this code
pageid <- eol_search('Pomatomus')$id[1]
out <- eol_pages(taxonconceptID=pageid)
eol_hierarchy(out[out$nameAccordingTo == "NCBI Taxonomy", "identifier"])
eol_hierarchy(out[out$nameAccordingTo == "Integrated Taxonomic Information System (ITIS)", "identifier"])

Run the code above in your browser using DataLab