The single source of truth for the candidate sort: the fuzzy distance,
whether the key has occurrence records, the remaining concept scores of
score_candidates() in tier order, the occurrence count, then the
nomenclatural-validity tiebreak, then the lowest taxonID. Pass group_col to sort within groups first, so
the first row of each group is that group's best candidate.
Arguments
- candidates
A data.frame accepted by
score_candidates(), carrying ataxonIDcolumn and, whengroup_colis given, that column too.- scores
The
score_candidates()output forcandidates, when it has already been computed; recomputed whenNULL.- group_col
Character or
NULL. Column to sort by ahead of the scores.