---
layout: post
title: "Using adonis and betadisper from the vegan R package to compare groups (CC208)"
blurb: "Testing for significance with beta diversity"
author: "PD Schloss"
date: 2022-04-29 11:00
comments: false
youtube: oLf0EpMJ4yA
start_hash: 347ad108266734d6ef2de28345b1e75942fc7e68
end_hash: ec7d20338ae7eb6a1c7801914a7d3c8068690cf2
---

In this episode of Code Club, I provide a tutorial on using the adonis and betadisper functions from the vegan R package to compare groups of microbial communities. Along the way, Pat will review how to make an ordination with indicators of the centroid and ellipses around the points. We'll also discuss how to perform analyses with two variables simultaneously. He'll demonstrate this approach by using functions from `vegan`, `dplyr`, and `ggplot2`.


<iframe style="margin: 0 auto;display:block;" width="560" height="315" src="https://www.youtube.com/embed/{{ page.youtube }}" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>


## Code

You can browse the state of the repository at the
* [beginning of the episode](https://github.com/riffomonas/distances/tree/{{ page.start_hash }})
* [end of the episode](https://github.com/riffomonas/distances/tree/{{ page.end_hash }})
