Running non-metric multidimensional scaling (NMDS) in R with vegan and ggplot2 (CC187)
Channel: Riffomonas Project
Date: 2022-02-14

Non-metric multidimensional scaling (NMDS) is an alternative to principle coordinates analysis (PCoA) and its relative, principle component analysis (PCA). All of these are popular ordination techniques that you can use to reduce the dimensions of data in R. In this episode, Pat Schloss will show how to perform NMDS in R and visualize the ordination in ggplot2. We'll use the metaMDS function from vegan and tools from ggplot2 and the tidyverse packages.

You can find my blog post for this episode at https://www.riffomonas.org/code_club/2022-02-14-nmds. The data were generated in our Kozich et al. 2013 paper (http://doi.org/10.1128/AEM.01043-13) using samples from the Schloss et al. 2012 paper (http://doi.org/10.4161/gmic.21008).

#metaMDS #vegan #ggplot2 #R #Rstudio #Rstats

Want more practice on the concepts covered in Code Club? You can sign up for my weekly newsletter at https://shop.riffomonas.org/youtube to get practice problems, tips, and insights.

If you're interested in taking an upcoming 3 day R workshop be sure to check out our schedule at https://riffomonas.org/workshops/

You can also find complete tutorials for learning R with the tidyverse using...
Microbial ecology data: https://www.riffomonas.org/minimalR/
General data: https://www.riffomonas.org/generalR/

0:00 Performing NMDS analysis in R
4:08 Using vegan's metaMDS to perform NMDS
7:26 Plotting ordination data with ggplot2
8:23 Bringing metadata into ordination
11:07 Comparing to PCoA ordination