match_krs: Match a name using KRS.

View source: R/krs.R

match_krsR Documentation

Match a name using KRS.

Description

Use the Kew Reconciliation Service to match a name against IPNI.

Usage

match_krs(query, .wait = 0.2, .retries = 3)

Arguments

query

The name to match using the reconciliation service. Use a named list to match parts of a name.

.wait

Time to wait before making a request, to help rate limiting.

.retries

The max number of times to retry the request to KRS. KRS seems to fail every other request, so adding a small number of retries helps prevent unnecessary failure.

Details

The Kew Reconciliation Service (KRS) allows name matching against IPNI using an Open Refine reconcilliation API.

Value

Returns an object of class krs_match that is a simple structure with slots for:

  • results: the query results parsed into a list.

  • response: the httr response object.

See Also

  • match_knms() to use simple matching for a vector of names.

Examples

# Match a name.
match_krs("Solanum sanchez-vegae")

# Match a name using name parts
match_krs(list(genus="Solanum", species="sanchez-vegae", author="Knapp"))

# Format a returned match as a dataframe
match <- match_krs(list(genus="Solanum", species="sanchez-vegae", author="Knapp"))
tidy(match)


barnabywalker/kewr documentation built on July 5, 2022, 5:37 p.m.