| taxo_distance | R Documentation |
Given two taxon names, retrieves their lineages from The Taxonomicon and computes a taxonomic distance based on the depth of their most recent common ancestor (MRCA):
taxo_distance(taxon_a, taxon_b, verbose = FALSE)
taxon_a |
A character string giving the first taxon name. |
taxon_b |
A character string giving the second taxon name. |
verbose |
Logical. If |
d(A, B) = \frac{1}{\text{depth}(\text{MRCA}(A,B))}
The deeper the shared ancestor, the smaller (closer to zero) the distance. This metric ensures that taxa diverging at the same node are always equidistant from any third taxon, regardless of lineage depth differences below the split.
A named list of class "taxodist_result" with the following elements:
distanceNumeric. The distance between the two taxa. Returns 0 if one taxon is an ancestor of the other.
mrcaCharacter. The name of the most recent common ancestor.
mrca_depthInteger. The depth of the MRCA node.
depth_aInteger. The lineage depth of taxon A.
depth_bInteger. The lineage depth of taxon B.
taxon_aCharacter. Name of the first taxon.
taxon_bCharacter. Name of the second taxon.
Returns NULL if either taxon cannot be found.
Brands, S.J. (1989 onwards). Systema Naturae 2000. Amsterdam, The Netherlands. Retrieved from The Taxonomicon, http://taxonomicon.taxonomy.nl.
mrca(), distance_matrix(), get_lineage()
# Distance between two theropods
taxo_distance("Tyrannosaurus", "Velociraptor")
# Distance between very distantly related taxa
taxo_distance("Tyrannosaurus", "Quercus")
# Distance between two oviraptorid genera
taxo_distance("Nomingia", "Huanansaurus")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.