| closest_relative | R Documentation |
Given a query taxon and a vector of candidate taxa, returns the candidate with the smallest phylogenetic distance to the query.
closest_relative(taxon, candidates, verbose = FALSE)
taxon |
A character string giving the query taxon name. |
candidates |
A character vector of candidate taxon names to compare against. |
verbose |
Logical. If |
A data frame with columns taxon (candidate name) and distance
(tree metric distance), sorted by distance ascending. Returns NULL if
the query taxon cannot be found.
closest_relative("Tyrannosaurus",
c("Velociraptor", "Triceratops", "Brachiosaurus", "Allosaurus"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.