Hi everyone! This blog post serves as a jumping-off point for various R scripts that will allow you to generate assemblages with different properties, and mess around with some of the alpha- and beta- diversity metrics we’ll be talking about in class. Please click the link below to go to the gitlab page where I’ll be posting code:
https://gitlab.com/jessecm/species-diversity-playground
If you don’t already have R, you’ll need to install it to use the code:
The main library we’ll be using to explore diversity patterns is “vegan,” which is authored by Jari Oksanen and others. A really helpful overview of some of the capabilities of vegan can be found here: http://127.0.0.1:12187/library/vegan/doc/diversity-vegan.pdf
And the help files of many of vegan’s functions are extremely well-researched and … well… helpful. The main starting points for us will be:
?diversity
and
?vegdist
For a general overview of working with data in R, you might want to check out this recent book "R for Data Science" by Garrett Grolemund & Hadley Wickham:
https://r4ds.had.co.nz/explore-intro.html
In addition to some of the code and dataset I’ll post on the gitlab page, we might dip into some other publicly available datasets, like the supplemental materials from this recent publication: https://esajournals.onlinelibrary.wiley.com/doi/abs/10.1002/ecy.2861