Learn R Programming

taxize (version 0.0.6)

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, usekey = FALSE,
    returntype = "data.frame", 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)
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