Learn R Programming

taxize (version 0.8.9)

comm2sci: Get scientific names from common names.

Description

Get scientific names from common names.

Usage

comm2sci(commnames, db = "eol", itisby = "search", simplify = TRUE, ...)

Arguments

commnames

One or more common names or partial names.

db

Data source, one of "eol" (default), "itis", "tropicos", "ncbi", or "worms". Note that each taxonomic data source has their own identifiers, so that if you provide the wrong db value for the identifier you could get a result, but it will likely be wrong (not what you were expecting).

itisby

Search for common names across entire names (search, default), at beginning of names (begin), or at end of names (end).

simplify

(logical) If TRUE, simplify output to a vector of names. If FALSE, return variable formats from different sources, usually a data.frame.

...

Further arguments passed on to internal methods.

Value

A vector of names.

See Also

search_common, eol_search, tp_search

sci2comm

Examples

Run this code
# NOT RUN {
comm2sci(commnames='black bear')
comm2sci(commnames='black bear', db='itis')
comm2sci(commnames='annual blue grass', db='tropicos')
comm2sci(commnames=c('annual blue grass','tree of heaven'), db='tropicos')
comm2sci(commnames=c('black bear', 'roe deer'))
comm2sci('blue whale', db = "worms")
comm2sci(c('blue whale', 'dwarf surfclam'), db = "worms")

# Output easily converts to a data.frame with \code{\link[plyr]{ldply}}
library(plyr)
ldply(comm2sci(commnames=c('annual blue grass','tree of heaven'),
  db='tropicos'))

# Use curl options
library("httr")
comm2sci(commnames='black bear', config=verbose())
comm2sci(commnames='black bear', db="itis", config=verbose())
comm2sci(commnames='bear', db="ncbi", config=verbose())
comm2sci(commnames='annual blue grass', db="tropicos", config=verbose())
# }

Run the code above in your browser using DataLab