get_wormsid | R Documentation |
Retrieve the WoRMS id of a taxon.
get_wormsid( searchterm, searchtype = "scientific", accepted = TRUE, ask = TRUE, verbose = TRUE )
searchterm |
character; A vector of common or scientific names. |
searchtype |
character; One of 'scientific' or 'common', or any unique abbreviation |
accepted |
logical; If TRUE (default), removes names that are not accepted valid names by WoRMS. Set to FALSE to give back both accepted and unaccepted names. |
ask |
logical; should get_tsn be run in interactive mode? If TRUE and more than one TSN is found for teh species, the user is asked for input. If FALSE NA is returned for multiple matches. |
verbose |
logical; should progress be printed? |
A vector of WoRMS ids. If a taxon is not found NA is given. If more than one WoRMS id is found the function asks for user input (if ask = TRUE), otherwise returns NA. Comes with an attribute match to investigate the reason for NA (either 'not found', 'found' or if ask = FALSE 'multi match')
classification_s
## Not run: get_wormsid(searchterm = "Salvelinus fontinalis") get_wormsid(c("Salvelinus fontinalis","Pomacentrus brachialis")) splist <- c("Salvelinus fontinalis", 'Pomacentrus brachialis', "Leptocottus armatus", "Clinocottus recalvus", "Trachurus trachurus", "Harengula clupeola") get_wormsid(splist, verbose=FALSE) # When not found get_wormsid(searchterm="howdy") get_wormsid(c("Salvelinus fontinalis", "howdy")) # Using common names get_wormsid(searchterm="salmon", searchtype="common") ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.