View source: R/speciesBelongToTaxon.R
| speciesBelongToTaxon | R Documentation | 
Check in WORMS if species belongs to a taxon.
speciesBelongToTaxon(species, taxon)
species | 
 Vector of species to check.  | 
taxon | 
 Taxon as character.  | 
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.
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.
Marco A. Ámez , marco.amez@ieo.es
> species_to_check <- c("Loligo vulgaris", "Raja clavata", "Sardina pilchardus")
> speciesBelongToTaxon(species_to_check, "Elasmobranchii")
[1] FALSE  TRUE FALSE
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.