## 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)
Run the code above in your browser using DataLab