cp_name_match: Name Matching

Description Usage Arguments Details Value Examples

View source: R/cp_name_match.R

Description

Match name against the name index

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
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

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.

Value

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

Examples

1
2
3
4
5
6
7
8
9
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

## End(Not run)

rcol documentation built on July 3, 2021, 1:06 a.m.