penalty: Compute penalty score

penaltyR Documentation

Compute penalty score

Description

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.

Usage

judgePenalty(x, tools = TRUE, clean = TRUE, verbose = FALSE)
zeroPenalty(x)
relaxPenalty(x, tool = c("ssp2sstr", "sstr2ssp", "slat2null", "str2null", "null2str"))
queuePenalty(x, ...)

Arguments

x

a list as returned by seekTaxon.

tools

if TRUE apply relaxPanalty.

tool

selects a specific tool (defaults to all available tools) to handle critical cases. See ‘Details’.

clean

apply subHybrid.

verbose

print diagnostic messages.

...

arguments passed to judgePenalty.

Details

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

Value

a named list.

Author(s)

Roland Kaiser

References

Jansen, F. & Dengler, J. (2010). Plant names in vegetation databases - a neglected source of bias. Journal of Vegetation Science, 21:1179–1186.

See Also

seekTaxon

Examples

data(taxa)

#judgePenalty(seekTaxon(taxa, reference))

kardinal-eros/linktaxa documentation built on Jan. 13, 2024, 9:15 p.m.