View source: R/uniformTaxonomy.R
| uniformTaxonomy | R Documentation |
This function normalizes the taxonomy returned by the EPPO service, producing a uniform structure that includes all possible taxonomic categories, even when some of them are not present in the original result.
uniformTaxonomy(taxonomyData)
taxonomyData |
|
The function uses an internal set of known taxonomic ranks and performs
a left join with the taxonomy dataframe, filling missing ranks with NA.
After the join, the column level from the original taxonomy is removed,
since the rank order is fully defined by the internal reference list. The
column queried_eppo_code NA values are filled with the right code.
A dataframe where each row represents one of the expected taxonomic
ranks. Fields corresponding to ranks not present in the original taxonomy
are filled with NA. The level column is excluded from the output. The
column queried_eppo_code NA values are filled with the right code.
## Not run:
# Retrieve taxonomy data from the EPPO service.
taxonData_ <- taxon(eppoCodes = c("BEMITA"), services = c("taxonomy"))
# Create a uniform taxonomy with all ranks.
taxonomyData_ <- uniformTaxonomy(taxonomyData = taxonData_$taxonomy)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.