Description Usage Arguments See Also

This is a convenience wrapper for the <e2><80><98>cmdscale<e2><80><99> function from the vegan package. It takes a distance matrix (an object of type "dist") and performs a PCoA ordination with <e2><80><98>cmdscale<e2><80><99>, for two dimensions (k = 2). Returns a list containing <e2><80><98>Coordinates<e2><80><99>, a tbl with the PCoA coordinates; and <e2><80><98>Variance1<e2><80><99> and <e2><80><98>Variance2<e2><80><99>, the percentage variance explained by the first and second PCoA axes respectively.

The method for calculating variance explained comes from http://r-sig-ecology.471788.n2.nabble.com/Variability-explanations-for-the-PCO-axes-as-in-Anderson-and-Willis-2003-td6429547.html.

1 | ```
do_PCoA(DistanceMatrix)
``` |

`DistanceMatrix` |
a dist object containing the distances between samples |

dist for info on the dist object

read_dist to read a distance matrix from a file (e.g. reading in UniFrac distances)

cmdscale the vegan function that performs the actual ordination

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.