sppairs – short for ‘species pairs’, and pronounced ‘spares’ – is an R package that calculates co-occurrence between pairs of species. This form of analysis is complementary to distance-based methods (PCA, MDS, etc.), and can be useful for investigating hypotheses about how species interact. The workhorse function is called ‘spaa’, which is an acronym for ‘species pairwise association analysis’, and works like an apply function; you supply a site (rows) by species (columns) matrix and specify a function to calculate the pairwise associations, and spaa does the rest. I originally wrote this package to investigate co-occurrence using odds ratios as outlined in this paper, but there are now a range of built-in functions, or you can specify your own.
As well as calculating pairwise co-occurrence, sppairs has some extra useful tools built in. In particular, it includes basic functions to clean your input data and to convert the output data.frame to a matrix (and back again, if you’d like). It also has a basic plot function to draw your results as a network, or alternatively circleplot will work directly on the data.frame returned by spaa.