taxize (version 0.1.5)

get_uid: Get the UID codes from NCBI for taxonomic names.

Description

Retrieve the Unique Identifier (UID) of a taxon from NCBI taxonomy browser.

Usage

get_uid(sciname, ask = TRUE, verbose = TRUE)

Arguments

sciname
character; scientific name.
ask
logical; should get_tsn be run in interactive mode? If TRUE and more than one TSN is found for the species, the user is asked for input. If FALSE NA is returned for multiple matches.
verbose
logical; If TRUE the actual taxon queried is printed on the console.

Value

  • A vector of unique identifiers (UID). If a taxon is not found NA. If more than one UID 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_tsn, classification

Examples

Run this code
get_uid(c("Chironomus riparius", "Chaetopteryx"))
get_uid(c("Chironomus riparius", "aaa vva"))

# When not found
get_uid("howdy")
get_uid(c("Chironomus riparius", "howdy"))

# multiple matches
get_uid('Dugesia')  # user prompt needed
get_uid('Dugesia', ask = FALSE) # returns NA for multiple matches

Run the code above in your browser using DataLab