How to create a biplot using vegan and ggplot2 (CC203)
Channel: Riffomonas Project
Date: 2022-04-11

Although vegan has its own functions for generating biplots, they're a little funky. We'll create our own using ggplot2, dplyr, purrr, ggrepel, and broom. This will allow us to better understand what biplots are and get more practice using these great packages.

You can find my blog post for this episode at https://www.riffomonas.org/code_club/2022-04-11-biplot. 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).

#ggplot2 #vegan #tidyverse #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 Creating a biplot within the tidyverse
1:20 Reading in and formattng a shared file
3:53 Generating an NMDS ordination with vegan
8:08 Calculating correlation between NMDS positions and OTU relative abundance
17:00 Generating the biplot