-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathREADME.Rmd
151 lines (113 loc) · 5.59 KB
/
README.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
---
output: github_document
---
<!-- badges: start -->
[![test-coverage](https://github.com/jamestsakalos/comspat/actions/workflows/test-coverage.yaml/badge.svg)](https://github.com/jamestsakalos/comspat/actions/workflows/test-coverage.yaml)
[![Codecov test coverage](https://codecov.io/gh/jamestsakalos/comspat/branch/master/graph/badge.svg)](https://app.codecov.io/gh/jamestsakalos/comspat?branch=master)
[![lint](https://github.com/jamestsakalos/comspat/actions/workflows/lint.yaml/badge.svg)](https://github.com/jamestsakalos/comspat/actions/workflows/lint.yaml)
[![R-CMD-check](https://github.com/jamestsakalos/comspat/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/jamestsakalos/comspat/actions/workflows/R-CMD-check.yaml)
[![pkgdown](https://github.com/jamestsakalos/comspat/actions/workflows/pkgdown.yaml/badge.svg)](https://github.com/jamestsakalos/comspat/actions/workflows/pkgdown.yaml)
<!-- badges: end -->
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```
# comspat
R functions for analyzing the ‘within-**com**munity **spat**ial organization’ of
species combinations to model plant species co-occurrence patterns as a function
of increasing sampling resolution.
## Description
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.
## News
* 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
:::: {style="display: flex;"}
::: {}
## Main functionalities
* 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
:::
::: {}
<br />
<br />
<br />
<center>
![](https://github.com/jamestsakalos/ComSpat/blob/master/vignettes/Animation_3_Steps.gif?raw=true){width="65%"}
</center>
:::
::::
## Installation from the source
You can install the released version of `comspat` from [CRAN](https://CRAN.R-project.org) with:
``` {r loading-cran-package, message = FALSE, eval = FALSE}
install.packages("comspat")
```
And the development version from [GitHub](https://github.com/jamestsakalos/comspat) with:
``` {r loading-github-package, message = FALSE, , eval = FALSE}
devtools::install_github(
"jamestsakalos/comspat",
build_vignettes = TRUE
)
```
## Example
This is a basic example which shows you how to use the main comspat function:
```{r example}
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.
## References
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.
\doi{10.1111/ecog.06216}