R code for calculating measures of species diversity including Jaccard and Sorensen indices, Hill numbers, and beta diversity.