Learn R Programming

taxize (version 0.0.5)

get_tsn: Get the TSN code for a search term.

Description

get_tsn uses a variety of functions from the itis function.

Usage

get_tsn(searchterm, searchtype = "sciname",
    verbose = TRUE)

Arguments

searchterm
A vector of common or scientific names.
searchtype
One of 'sciname', 'anymatch', 'comnamebeg', 'comname', 'comnameend'.
verbose
should progress be printed?

Value

  • A vector of taxonomic serial numbers (TSN). If a species is not found NA. If more than one TSN is found the function asks for user input. See functions in the itis function.

Examples

Run this code
get_tsn(searchterm="Quercus douglasii", searchtype="sciname")
get_tsn(searchterm="Chironomus riparius", searchtype="sciname")
get_tsn(c("Chironomus riparius","Quercus douglasii"), "sciname")
splist <- c("annona cherimola", 'annona muricata', "quercus robur",
		"shorea robusta", "pandanus patina", "oryza sativa", "durio zibethinus")
get_tsn(splist,"sciname")

Run the code above in your browser using DataLab