speciesBelongToTaxon: Check in WORMS if species belongs to a taxon.

View source: R/speciesBelongToTaxon.R

speciesBelongToTaxonR Documentation

Check in WORMS if species belongs to a taxon.

Description

Check in WORMS if species belongs to a taxon.

Usage

speciesBelongToTaxon(species, taxon)

Arguments

species

Vector of species to check.

taxon

Taxon as character.

Details

Is the vectorized version of check_spe_belongs_to_taxon().

Uses WORMS api to identify the species taxon.

If the species contains the abbreviation spp, the " spp" is removed from the name in order to find a match in WORMS.

Value

Vector with the species belonging to taxon. For every species, TRUE if belongs to taxon. False if doesn't. In case the species doesn't exists in WORMS a warning is thrown and the text "this species doesn't match in WORMS" is returned. In case multiple matchs, a warning is thrown and the text "multiple match in WORMS" is returned.

Author(s)

Marco A. Ámez , marco.amez@ieo.es

Examples

> species_to_check <- c("Loligo vulgaris", "Raja clavata", "Sardina pilchardus")
> speciesBelongToTaxon(species_to_check, "Elasmobranchii")
[1] FALSE  TRUE FALSE

Eucrow/sapmuebase documentation built on April 17, 2024, 10:29 a.m.