Learn R Programming

rcol (version 0.2.0)

cp_name_match: Name Matching

Description

Match name against the name index

Usage

cp_name_match(
  q = NULL,
  rank = NULL,
  code = NULL,
  trusted = NULL,
  ver_bose = NULL,
  start = 0,
  limit = 10,
  ...
)

Arguments

q

(character) scientific name to match

rank

(character) rank to restrict matches to. one of: domain, realm, subrealm, superkingdom, kingdom, subkingdom, infrakingdom, superphylum, phylum, subphylum, infraphylum, superclass, class, subclass, infraclass, parvclass, superdivision, division, subdivision, infradivision, superlegion, legion, sublegion, infralegion, supercohort, cohort, subcohort, infracohort, gigaorder, magnorder, grandorder, mirorder, superorder, order, nanorder, hypoorder, minorder, suborder, infraorder, parvorder, megafamily, grandfamily, superfamily, epifamily, family, subfamily, infrafamily, supertribe, tribe, subtribe, infratribe, suprageneric_name, genus, subgenus, infragenus, supersection, section, subsection, superseries, series, subseries, infrageneric_name, species_aggregate, species, infraspecific_name, grex, subspecies, cultivar_group, convariety, infrasubspecific_name, proles, natio, aberration, morph, variety, subvariety, form, subform, pathovar, biovar, chemovar, morphovar, phagovar, serovar, chemoform, forma_specialis, cultivar, strain, other, unranked

code

(character) nomenclatural code to restrict matches to. one of: bacterial, botanical, cultivars, viral, zoological, phytosociological

trusted

(logical) if TRUE, unmatched name will be inserted into the names index. default: FALSE

ver_bose

(logical) if TRUE, list alternatively considered name matches. default: FALSE

start

(integer) requested number of offset records. Default: 0

limit

(integer) requested number of maximum records to be returned. Default: 10; max: 1000

...

curl options passed on to verb-GET

Value

a named list, with slots name (list), type (character), alternatives (data.frame), and nameKey (integer)

Details

Matches by the canonical name, it's authorship and rank. Authorship matching is somewhat loose, but name matching is quite strict and only allows for a few common misspellings frequently found in epithets (silent h, gender suffix, double letters, i/y), but not in uninomials. Suprageneric ranks are all considered to be the same, otherwise a different rank results in a different match.

Examples

Run this code
# NOT RUN {
if (cp_up("/name/matching?q=Apis")) { 
cp_name_match(q="Apis")
}
# }
# NOT RUN {
cp_name_match(q="Agapostemon")
cp_name_match(q="Apis mellifera")
cp_name_match(q="Apis mellifer") # no fuzzy match apparently
# }

Run the code above in your browser using DataLab