readme.md

spasm - Species association metrics for various data types

This package contains code for several species association metrics and analyses that I used in paper "Measurement and analysis of interspecific spatial associations as a facet of biodiversity" by Petr Keil, Thorsten Wiegand, Aniko B. Toth, Daniel J. McGlinn & Jonathan M. Chase.

This is not a regular R package

Majority of functions in this package have more mature counterpars in other existing packages. 'spasm' is more of an assortment of code and wrappers that I needed for a review of species association metrics, and putting the code to the form of a package is my way of understanding, organizing, and documenting the code.

The existing packages that may do the same or better job than spasm are:

Before using a spasm function, please have a look at these packages - they may do what you need in a more standard way.

Installing spasm

To install the latest version of spasm, the easiest way is using the install_github function from the devtools package:

library(devtools)
install_github("petrkeil/spasm")

Alternatively, you can also download the .zip file, extract it, and then run the following command in the terminal from within the folder that contains the extracted spasm sub-folder:

R CMD build spasm

Overview

spasm contains:

Analyses

These are all analyses that were done in the paper. They are located in the analyses sub-folder, and contain the comparison of ISA metrics on empirical data, comparison of ISA metrics on simulated data, and analyses of data obtained by literature search.

Data

These are located in the data sub-folder, and also load as a part of the package when library(spasm) is executed. All of the data objects have data. prefix in their name.

Spatially implicit metrics for site x species incidence matrices

These are functions whose names begin with C_. A typical example is Stone & Roberts' C-score.

Spatially implicit metrics for site x species abundance matrices

Names of these functions begin with CA_.

Spatially explicit methods for site x species matrices

So far these are not provided here, but in Dan McGlinn's package vario here.

Methods for point patterns

The following methods are implemented, togehter with their respective null models:

The implementation relies heavily on existing spatstat functions.

What needs to be cited

Spasm "re-packages" some example data and their source should be credited, if these data are re-used. Specifically:



petrkeil/spasm documentation built on Jan. 15, 2021, 6:08 p.m.