sppairs

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.

Click here for a tutorial that shows the core functions of sppairs

beetles_figure

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s