| taxo_ordinate | R Documentation |
Computes pairwise taxonomic distances and applies classical multidimensional scaling (PCoA) to project taxa into a low-dimensional space.
taxo_ordinate(taxa, k = 2, ...)
taxa |
A character vector of taxon names, or a |
k |
Number of dimensions. Default |
... |
Additional arguments passed to |
An object of class "taxodist_ord" — a list with:
pointsA matrix of coordinates (taxa x k dimensions).
distThe underlying distance matrix.
GOFGoodness-of-fit fromstats::cmdscale().
eigThe eigenvalues computed during PCoA.
taxo_cluster(), distance_matrix()
taxa <- c("Tyrannosaurus", "Velociraptor", "Triceratops", "Brachiosaurus")
ord <- taxo_ordinate(taxa)
if (!is.null(ord$points)) {
plot(ord$points, type = "n")
text(ord$points, labels = rownames(ord$points))
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.