penalty | R Documentation |
The functions compute penalty scores that can then be used to rank the quality of matches. A perfect match between two respective taxa results in a penalty score of zero. If a taxon has no exact match to the reference the penalty score is always bigger than zero. In case of approximate matches each match is ranked according to the string distance.
judgePenalty(x, tools = TRUE, clean = TRUE, verbose = FALSE)
zeroPenalty(x)
relaxPenalty(x, tool = c("ssp2sstr", "sstr2ssp", "slat2null", "str2null", "null2str"))
queuePenalty(x, ...)
x |
a list as returned by |
tools |
if |
tool |
selects a specific tool (defaults to all available tools) to handle critical cases. See ‘Details’. |
clean |
apply |
verbose |
print diagnostic messages. |
... |
arguments passed to |
The functions perform the following tasks:
judgePenalty
is the main function and calls the next two subroutines.
zeroPenalty
checks for exact matches for which the penalty score is zero.
relaxPenalty
allows for some exceptions (special cases) and does not increase the penalty for those matches (see below).
queuePenalty
reorders list sub elements according to penalty score (internally calls judgePenalty
).
Jansen & Dengler (2010) urge for the use of abbreviations such as s.str. or s.l. for differently wide species concepts. “critical” taxon names that can be misapplied (variants of the same taxonym with and without s.lat., s.str., agg. or auct. non or if monotypic species occur) requires a specific decision/confirmation of the researcher for such assignments. Allowing lower penalty scores for critical taxon matches is achieved by function relaxPenalty
. The obtained penalty scores aid in the process of assigning a species to the reference.
The tool
argument to relaxPenalty
allows for matches where the species to be matched is transformed in various ways. It is then searched upon all ambiguous matches. The specific implementation of each tool is as follows:
"ssp2sstr" | calls asSensuStricto to reduce intra specific epithet to s.str. |
"sstr2ssp" | calls expandSensuStricto to expand s.str. to intra specific epithet |
"slat2null" | calls stripSensuLato to strip of s.lat. |
"str2null" | calls stripSensuStricto to strip of s.str. |
"null2str" | calls addSensuStricto adds s.str. where this might be appropiate |
a named list.
Roland Kaiser
Jansen, F. & Dengler, J. (2010). Plant names in vegetation databases - a neglected source of bias. Journal of Vegetation Science, 21:1179–1186.
seekTaxon
data(taxa)
#judgePenalty(seekTaxon(taxa, reference))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.