The one rule that turns a taxon's WoRMS class / kingdom (plus "is a BirdLife bird" and "is a
SWOT turtle") into the MST scoring component. It lived inline in merge_taxon.qmd; from v9
the AquaX ingest also needs it — to report species by component before a merge exists —
so it is a function both call rather than two copies that drift.
Usage
sp_cat_from_taxonomy(
class,
kingdom = NA_character_,
is_botw = FALSE,
is_turtle = FALSE
)
Arguments
- class
WoRMS class (character; NA allowed)
- kingdom
WoRMS kingdom (character; NA allowed)
- is_botw
logical; the taxon is keyed by BirdLife (BOTW)
- is_turtle
logical; the taxon is one of the SWOT sea turtles
Value
character vector of categories, parallel to class
Details
Categories: turtle (the SWOT set), bird (BirdLife or class Aves), mammal, reptile and
amphibian (categorized but EXCLUDED from scoring), fish, coral (Hexa/Octocorallia),
primary_producer (Plantae / Chromista / Bacteria), else invertebrate. No other.
Examples
sp_cat_from_taxonomy(c("Mammalia", "Teleostei", "Hexacorallia", NA),
c("Animalia", "Animalia", "Animalia", "Plantae"))
#> [1] "mammal" "fish" "coral" "primary_producer"