
Enrich and certify a list of species names by comparing with WoRMS.
Source:R/taxon_id_worms.R
taxon_id_worms.Rd
This function provide tibble object with all the columns of input table
of taxa plus new columns such as valid_name, valid_authority, valid_AphiaID,
status, synonyms, LSID, url, matchType, nOfWormsRecords, wormsRecords
obtained from Word Register of Marine Species
WoRMS rest API.
Arguments
- input
A
tibble. The table that contain the species names list to be checked.- taxaColumn
A
numeric. The cardinal number of the column where species list is. Default is1.- verbose
A
logical. Whit this selection, the function returns a message with number of record(s) that don't match with any Worms names and the number of record(s) that match with more that one Worms name. Default isTRUE.- refine
A
logical. With this selection, the function allows to refine the result(s) that match with more Worms records. By a interactive use of the terminal, the user can chose the result. Default isFALSE.
Value
The output of the function is a tibble with the columns provided
and new columns such as: valid_name, valid_authority, valid_AphiaID, status,
synonyms, LSID, url, matchType, nOfWormsRecords, wormsRecords obtained by
Worms rest API.
The function also return, if verbose is TRUE, the list of records that don't
match with Worms name species.
Most of the labels of the columns are the terms of
Darwin Core terms.
The columns labels are annotate with the link (URI) of the
Darwin Core terms
as attributes of the tibble.
Author
Alessandro Oggioni, phD (2021) oggioni.a@irea.cnr.it
Paolo Tagliolato, phD (2021) tagliolato.p@irea.cnr.it
Examples
phytoplankton <- tibble::tibble(
ID = c(1, 2, 3, 4, 5, 6, 7),
species = c(
"Asterionella formosa", "Chrysococcus sp.",
"Cryptomonas rostrata", "Dinobryon divergens",
"Mallomonas akrokomos", "Melosira varians",
"Cryptomonas rostrata"
)
)
table <- taxon_id_worms(
input = phytoplankton,
taxaColumn = 2,
verbose = TRUE,
refine = TRUE
)
#>
#> After the finding operation the number of record(s) that don't match
#> with any Worms names are:
#> *--- 0 on 7 examined ---*
#> please verify the species name provided and run again this
#> function. The record(s) that match with more that one Worms name are:
#> *--- 7 on 7 examined ---*
#> please use the function taxon_id_worms_refine for specify wich
#> is the exact corrispondence with your given species name.
table
#> # A tibble: 7 × 17
#> ID originalNameUsage scientificName scientificNameAuthorship taxonID
#> <dbl> <chr> <lgl> <lgl> <lgl>
#> 1 1 Asterionella formosa NA NA NA
#> 2 2 Chrysococcus sp. NA NA NA
#> 3 3 Cryptomonas rostrata NA NA NA
#> 4 4 Dinobryon divergens NA NA NA
#> 5 5 Mallomonas akrokomos NA NA NA
#> 6 6 Melosira varians NA NA NA
#> 7 7 Cryptomonas rostrata NA NA NA
#> # ℹ 12 more variables: taxonomicStatus <lgl>, synonyms <lgl>, taxonRank <lgl>,
#> # kingdom <lgl>, phylum <lgl>, class <lgl>, order <lgl>, family <lgl>,
#> # genus <lgl>, scientificNameID <lgl>, nOfWormsResults <dbl>,
#> # wormsRecords <lgl>
# The annotated URIs of columns label are achieved by:
attributes(table)$uri
#> [1] ""
#> [2] "http://rs.tdwg.org/dwc/terms/originalNameUsage"
#> [3] "http://rs.tdwg.org/dwc/terms/scientificName"
#> [4] "http://rs.tdwg.org/dwc/terms/scientificNameAuthorship"
#> [5] "http://rs.tdwg.org/dwc/terms/taxonID"
#> [6] "http://rs.tdwg.org/dwc/terms/taxonomicStatus"
#> [7] ""
#> [8] "http://rs.tdwg.org/dwc/terms/taxonRank"
#> [9] "http://rs.tdwg.org/dwc/terms/kingdom"
#> [10] "http://rs.tdwg.org/dwc/terms/phylum"
#> [11] "http://rs.tdwg.org/dwc/terms/class"
#> [12] "http://rs.tdwg.org/dwc/terms/order"
#> [13] "http://rs.tdwg.org/dwc/terms/family"
#> [14] "http://rs.tdwg.org/dwc/terms/genus"
#> [15] "http://rs.tdwg.org/dwc/terms/scientificNameID"
#> [16] ""
#> [17] ""