Learn R Programming

taxize (version 0.9.4)

sci2comm: Get common names from scientific names.

Description

Get common names from scientific names.

Usage

sci2comm(...)

# S3 method for default sci2comm(scinames, db = "eol", simplify = TRUE, ...)

# S3 method for uid sci2comm(id, ...)

# S3 method for tsn sci2comm(id, simplify = TRUE, ...)

# S3 method for wormsid sci2comm(id, simplify = TRUE, ...)

# S3 method for iucn sci2comm(id, simplify = TRUE, ...)

Arguments

...

Further arguments passed on to functions get_uid, get_tsn.

scinames

character; One or more scientific names or partial names.

db

character; Data source, one of "eol" (default), "itis" "ncbi", "worms", or "iucn". 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).

simplify

(logical) If TRUE, simplify output to a vector of names. If FALSE, return variable formats from different sources, usually a data.frame. Only applies to eol and itis. Specify FALSE to obtain the language of each vernacular in the output for eol and itis.

id

character; identifiers, as returned by get_tsn, get_uid.

Value

List of character vectors, named by input taxon name, or taxon ID

Authentication

See taxize-authentication for help on authentication

See Also

comm2sci

Examples

Run this code
# NOT RUN {
sci2comm(scinames='Helianthus annuus', db='eol')
sci2comm(scinames='Helianthus annuus', db='itis')
sci2comm(scinames=c('Helianthus annuus', 'Poa annua'))
sci2comm(scinames='Puma concolor', db='ncbi')
sci2comm('Gadus morhua', db='worms')
sci2comm('Pomatomus saltatrix', db='worms')
sci2comm('Loxodonta africana', db='iucn')

# Passing id in, works for sources: itis and ncbi, not eol
sci2comm(get_tsn('Helianthus annuus'))
sci2comm(get_uid('Helianthus annuus'))
sci2comm(get_wormsid('Gadus morhua'))
sci2comm(get_iucn('Loxodonta africana'))

# Don't simplify returned
sci2comm(get_tsn('Helianthus annuus'), simplify=FALSE)
sci2comm(get_iucn('Loxodonta africana'), simplify=FALSE)

# Use curl options
sci2comm('Helianthus annuus', db="ncbi", verbose = TRUE)
# }

Run the code above in your browser using DataLab