MENU

Fun & Interesting

Tutorial on using adonis from the vegan R package (CC081)

Riffomonas Project 37,192 lượt xem 4 years ago
Video Not Working? Fix It Now

In this episode of Code Club, I provide a tutorial on using the adonis function from the vegan R package to compare three groups of microbial communities. Along the way, I'll provide a tutorial on how you can interface between tidyverse and base R functionalities. I'll break down how you can use these concepts to make all possible pairwise comparisons and insert some logic into your code that fails if you get an unexpected result.

Pat will use RStudio and functions from the ggplot2 package and other packages from the tidyverse. The accompanying blog post can be found at https://www.riffomonas.org/code_club/2021-03-18-vegan.

Do you have a figure that you would like to receive a critique or help improving? Let me know and I'd be happy to arrange a guest appearance!

If you're interested in taking an upcoming 3 day R workshop, email me at riffomonas@gmail.com!

R: https://r-project.org
RStudio: https://rstudio.com
Raw data: https://github.com/riffomonas/raw_data/releases/latest
Workshops: https://www.mothur.org/wiki/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 Introduction
3:42 Reading in a square phylip-formatted distance matrix
9:31 Getting set up for running adonis
13:26 Running adonis
15:32 Extracting p-value from adonis output
18:02 More complicated designs with adonis
19:29 Making pairwise comparisons
26:37 Correcting for multiple comparisons
29:37 Integrating with code for ordination
32:07 Conclusion

Comment