Beta diversity

Scripts used to calcualte a distance matrix to be used in further analyses. Several matrices can be calculated with different distance metrics, based on the research question. The distance can be e.g. giving more weight to the common or rare species, or finding a bit more balance, or it could be better suited for presence-absence data if one wants to use that.

Download the script 020_beta_diversity.R, or copy the codes below into your own script.