Learn R Programming

taxize (version 0.0.6)

tp_namedistributions: Return all distribution records for for a taxon name with a given id.

Description

Return all distribution records for for a taxon name with a given id.

Usage

tp_namedistributions(id, format = "json", output = "df",
    key = NULL)

Arguments

id
the taxon identifier code
format
return in json or xml format (defaults to json)
output
raw = json or xml; or df = data.frame
key
Your Tropicos API key; loads from .Rprofile.

Value

  • List or dataframe.

Examples

Run this code
# Raw json or xml
tp_namedistributions(id = 25509881, output = 'raw')

# Output as data.frame
df <- tp_namedistributions(id = 25509881)
df[df$category %in% 'Location',] # just location data
df[df$category %in% 'Reference',] # just reference data

Run the code above in your browser using DataLab