knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>"
)

The Kew Names Matching Service (KNMS) allows a user to submit taxon names for matching against records in Plants of the World Online (POWO). As far as I can tell, it uses exact matching as well as some rules-based matching to account for common orthographic variants and Latin mistakes.

The website provides interfaces for submitting a list of names copied into a text field, as well as through a CSV upload. I've made this package interface with the text field submission.

I'm not sure if KNMS is being maintained or updated at the moment, and may point towards an old version of POWO/WCVP. Therefore, it's a good first pass for matching the bulk of names but it's worth checking through any unmatched names, as they may be in POWO or WCVP.

library(kewr)

Matching names

To use KNMS, you just need to submit names for matching as a character vector or list.

matches <- match_knms("Poa annua")
matches

Where a name could be matched with multiple records - for example, if the same name has been published as different concepts - KNMS will return multiple matches, as it has here.

The raw results from KNMS can be a bit difficult to interpret, so it is best to tidy them for inspection.

tidy(matches)

We can see here that Poa annua has matched to both Poa annua L. and Poa annua Schltdl. & Cham..

To avoid having to resolve these multiple matches, it is usually best to submit the author string as part of the name, if it is available.

matches <- match_knms("Poa annua L.")
tidy(matches)

Multiple names can be submitted at once, as a list or character vector.

names_to_match <- c("Poa annua L.", "Myrcia guianensis", "Bulbophyllum sp.")

matches <- match_knms(names_to_match)
tidy(matches)

KNMS may not always match to the rank that you want. For instance, in the previous example Bulbophyllum sp. was matched to the genus name Bulbophyllum, rather than returning no match at all.

KNMS will accept a large number of names for matching, but may hang if too many are submitted. The match_knms function will return a warning if you submit more than 1000 names. In these cases, it might be easier to split your list of names into chunks, or use the CSV upload on the KNMS website.



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