Learn R Programming

taxize (version 0.1.0)

eol_hierarchy: Retrieve the taxonomic hierarchy from given EOL taxonID.

Description

Retrieve the taxonomic hierarchy from given EOL taxonID.

Usage

eol_hierarchy(taxonid, common_names = NULL,
    synonyms = NULL, returntype = "data.frame", key = NULL,
    callopts = list())

Arguments

taxonid
the EOL page identifier (character)
common_names
Return common names or not (defaults to returning them, give commonnames=0 if not)
synonyms
Return synonyms or not (defaults to returning them, give synonyms=0 if not)
returntype
one of "list" of "data.frame" (character)
key
Your EOL API key; loads from .Rprofile.
callopts
Further args passed on to GET.

Value

  • List or dataframe of results.

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(taxonid=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