### Introduction

### Theory, Examples & Exercises

en:pcoa_nmds_r

**This is an old revision of the document!**

(library`capscale`

`vegan`

) - without environmental variables, the function calculates PCoA, while with environmental variables it calculates distance-based RDA. Input could be either species composition matrix (samples x species) or distance matrix (in that case, the species scores will not be available, unless the original species composition matrix is provided as argument`comm`

). By default`distance = “euclidean”`

, which returns results identical to PCA. Note that even if no environmental variables are included, the formula structure is still required (e.g.`capscale (spe ~ 1, distance = 'bray')`

).(basic library`cmdscale`

`stats`

) - calculates PCoA on matrix of distances among samples (this could be calculated e.g. by function`vegdist`

from library`vegan`

). Use function`ordiplot`

to project the ordination diagram.(library`wcmdscale`

`vegan`

) - based on`cmdscale`

function, but allows to weight the importance of samples in the PCoA. If arguments`eig = TRUE`

or`x.ret = TRUE`

, the function returns an object of class “wcmdscale” with print, plot, scores, eigenvals and stressplot methods.(library`pcoa`

`ape`

) - another way how to achieve PCoA analysis. Use`biplot.pcoa`

function (or simply generic`biplot`

) to project ordination diagram. Does not work with`vegan`

's functions`ordiplot`

or`scores`

.(library`metaMDS`

`vegan`

) - rather advanced function, composed of many subroutine steps. See example below for details.(library`stressplot`

`vegan`

) - draws Shepards stress plot, which is the relationship between real distances between samples in resulting*m*dimensional ordination solution, and their particular compositional dissimilarities expressed by selected dissimilarity measure.(library`goodness`

`vegan`

) - returns goodness-of-fit of particular samples. See example how can be this result visualized (inspired by Borcard et al. 2011).

en/pcoa_nmds_r.1548499222.txt.gz · Last modified: 2019/01/26 18:40 by David Zelený