Skip to contents

Internal iterator extracted from run_taxonomic_key so nested categorical levels (subordens, grandes grupos, subgrupos, familias) can be iterated directly, without going through the rules[[level_key]] indirection that only makes sense at the top level.

Usage

run_taxa_list(pedon, taxa)

Arguments

pedon

A PedonRecord.

taxa

A list of taxon entries; each entry must have code, name, and tests fields, where tests is a block parseable by evaluate_rsg_tests.

Value

A list with assigned (the entry of the assigned taxon, or NULL when taxa was empty) and trace.

Details

Behavioural note: when taxa is empty or NULL, returns list(assigned = NULL, trace = list()) – a sub-level lookup with no canonical entries is non-fatal. The top-level run_taxonomic_key keeps the stricter "missing list is an error" semantics by guarding before calling this helper.