View source: R/Search_species.R
Search_species | R Documentation |
Match taxonomic inputs to a given row of ParentChild_gz
or its closest ancestor
Search_species(
Class = "predictive",
Order = "predictive",
Family = "predictive",
Genus = "predictive",
Species = "predictive",
add_ancestors = TRUE,
Database = FishLife::FishBase_and_RAM,
ParentChild_gz = Database$ParentChild_gz
)
Class |
Character input for taxonomic class |
Order |
Character input for taxonomic class |
Family |
Character input for taxonomic class |
Genus |
Character input for taxonomic class |
Species |
Character input for taxonomic class |
add_ancestors |
Boolean whether to add ancestors for matching species or not |
ParentChild_gz |
vector providing index of parent-taxon for every child-taxa |
This function attempts to do a smart match to elements of ParentChild_gz
. It sweeps from Order to Species
and ignores any taxonomic input listed as "predictive"
until it finds something else. It then appends
"predictive"
to any lower taxonomic level that is missing, and checks whether this specification yields a single,
unique taxon. If it does, it then returns the row number and potentially any ancestors (higher taxonomic levels)
integer of row numbers of ParentChild_gz
matching genus_species
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.