Learn R Programming

rgbif (version 0.7.0)

name_backbone: Lookup names in the GBIF backbone taxonomy.

Description

Lookup names in the GBIF backbone taxonomy.

Usage

name_backbone(name, rank = NULL, kingdom = NULL, phylum = NULL,
  class = NULL, order = NULL, family = NULL, genus = NULL,
  strict = FALSE, verbose = FALSE, start = NULL, limit = 20,
  callopts = list())

Arguments

callopts
Pass on options to httr::GET for more refined control of http calls, and error handling
limit
Number of records to return
start
Record number to start at
name
(character) Full scientific name potentially with authorship (required)
rank
(character) The rank given as our rank enum. (optional)
kingdom
(character) If provided default matching will also try to match against this if no direct match is found for the name alone. (optional)
phylum
(character) If provided default matching will also try to match against this if no direct match is found for the name alone. (optional)
class
(character) If provided default matching will also try to match against this if no direct match is found for the name alone. (optional)
order
(character) If provided default matching will also try to match against this if no direct match is found for the name alone. (optional)
family
(character) If provided default matching will also try to match against this if no direct match is found for the name alone. (optional)
genus
(character) If provided default matching will also try to match against this if no direct match is found for the name alone. (optional)
strict
(logical) If TRUE it (fuzzy) matches only the given name, but never a taxon in the upper classification (optional)
verbose
(logical) If TRUE show alternative matches considered which had been rejected.

Value

  • A list for a single taxon with many slots (with verbose=FALSE - default), or a list of length two, first element for the suggested taxon match, and a data.frame with alternative name suggestions resulting from fuzzy matching (with verbose=TRUE).

Details

If you don't get a match GBIF gives back a list of length 3 with slots synonym, confidence, and matchType='NONE'.

References

http://www.gbif.org/developer/summary

Examples

Run this code
name_backbone(name='Helianthus annuus', kingdom='plants')
name_backbone(name='Helianthus', rank='genus', kingdom='plants')
name_backbone(name='Poa', rank='genus', family='Poaceae')

# Verbose - gives back alternatives
name_backbone(name='Helianthus annuus', kingdom='plants', verbose=TRUE)

# Strictness
name_backbone(name='Poa', kingdom='plants', verbose=TRUE, strict=FALSE)
name_backbone(name='Helianthus annuus', kingdom='plants', verbose=TRUE, strict=TRUE)

# Non-existent name - returns list of lenght 3 stating no match
name_backbone(name='Aso')

Run the code above in your browser using DataLab