Search Catalogue of Life for taxonomic classifications.

Usage

col_classification(name = NULL, id = NULL, format = NULL, start = NULL, checklist = NULL,
  url = "http://www.catalogueoflife.org/col/webservice")

Arguments

name
The string to search for. Only exact matches found the name given will be returned, unless one or wildcards are included in the search string. An * (asterisk) character denotes a wildcard; a character may also be used. The name must be at least 3 characters long, not counting wildcard characters.
id
The record ID of the specific record to return (only for scientific names of species or infraspecific taxa)
format
format of the results returned. Valid values are format=xml and format=php; if the format parameter is omitted, the results are returned in the default XML format. If format=php then results are returned as a PHP array in serialized string format, which can be converted back to an array in PHP using the unserialize command
start
The first record to return. If omitted, the results are returned from the first record (start=0). This is useful if the total number of results is larger than the maximum number of results returned by a single Web service query (currently the maximum number of results returned by a single query is 500 for terse queries and 50 for full queries).
checklist
The year of the checklist to query, if you want a specific year's checklist instead of the lastest as default (numeric).
url
The base COL url for the function (should be left to default).

Value

A list of data.frame's.

Description

Search Catalogue of Life for taxonomic classifications.

Details

You must provide one of name or id. The other parameters (format and start) are optional.

Examples

# A basic example col_classification(name="Apis")
$Apis classif_id classif_name classif_rank 1 12247828 Animalia Kingdom 2 12247833 Arthropoda Phylum 3 12248024 Insecta Class 4 12248225 Hymenoptera Order 5 12252115 Apoidea Superfamily 6 12252157 Apidae Family
# An example where there is no classification col_classification(id=11935941)
$`11935941` classif_id classif_name classif_rank 1 12247828 Animalia Kingdom 2 12247941 Echinodermata Phylum 3 12249685 Asteroidea Class 4 12254343 Paxillosida Order 5 12258012 Porcellanasteridae Family 6 12437394 Abyssaster Genus
# Use a specific year's checklist col_classification(name="Apis", checklist="2012")
$Apis classif_id classif_name classif_rank 1 2339542 Animalia Kingdom 2 2339603 Arthropoda Phylum 3 2339755 Insecta Class 4 2339947 Hymenoptera Order 5 2344123 Apoidea Superfamily 6 2344165 Apidae Family
col_classification(name="Apis", checklist="2009")
$Apis classif_id classif_name classif_rank 1 1 Animalia Kingdom 2 134 Arthropoda Phylum 3 311 Insecta Class 4 551 Hymenoptera Order 5 560 Apoidea Superfamily 6 8597 Apidae Family
# Pass in many names or many id's out <- col_classification(name=c("Buteo","Apis","Accipiter","asdf"), checklist="2012") out$Apis # get just the output you want
classif_id classif_name classif_rank 1 2339542 Animalia Kingdom 2 2339603 Arthropoda Phylum 3 2339755 Insecta Class 4 2339947 Hymenoptera Order 5 2344123 Apoidea Superfamily 6 2344165 Apidae Family
ldply(out) # or combine to one data.frame
.id classif_id classif_name classif_rank 1 Buteo 2339542 Animalia Kingdom 2 Buteo 2339896 Chordata Phylum 3 Buteo 2340272 Aves Class 4 Buteo 2340295 Ciconiiformes Order 5 Buteo 2346405 Accipitridae Family 6 Apis 2339542 Animalia Kingdom 7 Apis 2339603 Arthropoda Phylum 8 Apis 2339755 Insecta Class 9 Apis 2339947 Hymenoptera Order 10 Apis 2344123 Apoidea Superfamily 11 Apis 2344165 Apidae Family 12 Accipiter 2339542 Animalia Kingdom 13 Accipiter 2339896 Chordata Phylum 14 Accipiter 2340272 Aves Class 15 Accipiter 2340295 Ciconiiformes Order 16 Accipiter 2346405 Accipitridae Family