Learn R Programming

taxize (version 0.4.0)

get_ubioid: Get the uBio id for a search term.

Description

Retrieve the uBio id of a taxon. This function uses ubio_search internally to search for names.

Usage

get_ubioid(searchterm, searchtype = "scientific", ask = TRUE,
  verbose = TRUE)

Arguments

searchterm
character; A vector of common or scientific names.
searchtype
character; One of 'scientific' or 'common', or any unique abbreviation
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?

Value

  • A vector of uBio ids. If a taxon is not found NA is given. If more than one uBio 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')

See Also

get_uid, ubio_search

Examples

Run this code
get_ubioid(searchterm = "Astragalus aduncus")
get_ubioid(c("Salvelinus fontinalis","Pomacentrus brachialis"))
splist <- c("Salvelinus fontinalis", 'Pomacentrus brachialis', "Leptocottus armatus",
		"Clinocottus recalvus", "Trachurus trachurus", "Harengula clupeola")
get_ubioid(splist, verbose=FALSE)

# When not found
get_ubioid(searchterm="howdy")
get_ubioid(c("Salvelinus fontinalis", "howdy"))

# Using common names
get_ubioid(searchterm="great white shark", searchtype="common")
get_ubioid(searchterm=c("bull shark", "whale shark"), searchtype="common")

Run the code above in your browser using DataLab