Subtaxonomy | R Documentation |
Functions to obtain the subtaxonomy or the set of taxa included in a
particular taxonomic group, according to the zoologTaxonomy
by default.
Subtaxonomy( taxon, taxonomy = zoologTaxonomy, thesaurus = zoologThesaurus$taxon ) SubtaxonomySet( taxon, taxonomy = zoologTaxonomy, thesaurus = zoologThesaurus$taxon ) GetSpeciesIn( taxon, taxonomy = zoologTaxonomy, thesaurus = zoologThesaurus$taxon )
taxon |
A name of any of the taxa, at any rank included in the taxonomy (from species to family in the zoolog taxonomy). |
taxonomy |
A taxonomy from which to extract the subtaxonomy.
By default |
thesaurus |
A thesaurus allowing datasets with different nomenclatures
to be merged. By default |
Subtaxonomy
returns a data.frame with the same structure of the input
taxonomy but with only the species (rows) included in the queried
taxon
, and the taxonomic ranks (columns)
up to its level.
SubtaxonomySet
returns a character vector including a unique copy
(set) of all the taxa, at any taxonomic rank, under the queried
taxon
.
Equivalent to Subtaxonomy but as a set instead of a dataframe.
GetSpeciesIn
returns a character vector including the species included
in the queried taxon
.
## Get species of genus Sus: GetSpeciesIn("Sus") ## Get species of family Bovidae: GetSpeciesIn("Bovidae") ## Get the subtaxonomy of the Tribe Caprini: Subtaxonomy("Caprini") ## Use SubtaxonomySet to join categories for computing log-ratios. ## For this, we read an example dataset: dataFile <- system.file("extdata", "dataValenzuelaLamas2008.csv.gz", package="zoolog") dataExample <- utils::read.csv2(dataFile, na.strings = "", encoding = "UTF-8") ## We illustrate with a subset of cases to make the example run ## sufficiently fast: dataExample <- dataExample[1:1000, ] ## Compute the log-ratios joining all taxa from tribe \emph{Caprini} ## to use the reference of \emph{Ovis aries}: categoriesCaprini <- list('Ovis aries' = SubtaxonomySet("Caprini")) dataExampleWithLogs <- LogRatios(dataExample, joinCategories = categoriesCaprini)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.