R functions for analyzing the ‘within-community spatial organization’ of species combinations to model plant species co-occurrence patterns as a function of increasing sampling resolution.
We present comspat, a new R package that uses grid or transect data sets to measure the number of realized (observed) species combinations (NRC) and the Shannon diversity of realized species combinations (compositional diversity; CD) as a function of spatial scale. NRC and CD represent two measures from a model family developed by Pál Juhász-Nagy based on Information Theory (see Juhász-Nagy, 1967, 1976, 1984a, 1984b, 1993; Juhász-Nagy & Podani, 1983).
To assist users in detecting and interpreting spatial associations and inferring assembly mechanisms, comspat offers complete spatial randomness and random shift null models, which assists users to disentangle the textural, intraspecific, and interspecific effects on the observed spatial patterns. Our open-sourced package provides a vignette that describes the method and reproduces the figures from this paper to help users contextualize and apply functions to their data.
For any questions, comments or bug reports please submit an issue here on GitHub. Suggestions, ideas and references of new algorithms are always welcome.
- February-2022: Version 1.0
- February-2023: Version 1.1.0
- Inclusion of two additional entropy functions
- Inclusion of classical species richness and Shannon diversity measures
- Calculates two information theory models based on species combinations
as a function of spatial scale, specifically;
- the number of realized (observed) species combinations (NRC)
- the Shannon diversity of realized species combinations (Compositional Diversity; CD)
- the Associatum (AS) and relativized associatum (AS_REL)
- Allows for the application of null models:
- complete spatial randomness (CSR) helps to show the combined effects of individual species level spatial aggregations and interspecific associations on observed (realized) coexistence relationships
- random shift (RS) helps to show the effects of interspecific associations after removing the effects of intraspecific aggregations on observed (realized) coexistence relationships
You can install the released version of comspat
from
CRAN with:
install.packages("comspat")
And the development version from GitHub with:
devtools::install_github(
"jamestsakalos/comspat",
build_vignettes = TRUE
)
This is a basic example which shows you how to use the main comspat function:
library("comspat")
data("grid_random", package = "comspat") #input data frame
data("param_grid", package = "comspat") #input parameter data frame
temp <- comspat(
data = grid_random,
params = param_grid[1:5,],
dim_max = 64,
type = "Grid"
)
The package vignette provides detailed explanation and demonstration on the application of comspat.
Juhász-Nagy, P. (1967). On association among plant populations I. Acta Biologica Debrecina, 5, 43–56.
Juhász-Nagy, P. (1976). Spatial dependence of plant populations. Part 1. Equivalence analysis (an outline for a new model). Acta Botanica Academiae Scientiarum Hungaricae, 22, 61–78.
Juhász-Nagy, P. & Podani, J. (1983). Information theory methods for the study of spatial processes and succession. Vegetatio, 51, 129–140.
Juhász-Nagy, P. (1984a). Notes on diversity. Part I. Introduction. Abstracta Botanica, 8, 43–55.
Juhász-Nagy, P. (1984b). Spatial dependence of plant populations. Part 2. A family of new models. Acta Botanica Hungarica, 30, 363–402.
Juhász-Nagy, P. (1993). Notes on compositional diversity. Hydrobiologia, 249, 173–182.
Tsakalos, J.L., Chelli, S., Campetella, G., Canullo, R., Simonetti, E., & Bartha, S. (2022). comspat: an R package to analyze within‐community spatial organization using species combinations. Ecography, 7, e06216.