| distance_matrix | R Documentation |
Given a vector of taxon names, computes all pairwise phylogenetic distances and returns a symmetric distance matrix. Lineages are cached after first retrieval to minimise redundant network requests.
distance_matrix(taxa, verbose = FALSE, progress = TRUE)
taxa |
A character vector of taxon names. |
verbose |
Logical. If |
progress |
Logical. If |
A symmetric numeric matrix of class "dist" containing pairwise
distances. Row and column names are set to the input taxon names.
Taxa that could not be found are included with NA distances.
taxo_distance(), closest_relative()
theropods <- c("Tyrannosaurus", "Velociraptor", "Spinosaurus",
"Allosaurus", "Carnotaurus")
mat <- distance_matrix(theropods)
print(mat)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.