synchrony: Species synchrony

Description Usage Arguments Details Value References Examples

View source: R/synchrony.R

Description

Calculates the degree synchrony in species abundances within a community over time. Includes the option for two different synchrony metrics. The first, developed by Loreau and de Mazancourt (2008), compares the variance of the aggregated community with the variance of individual components. The second, developed by Gross et al. (2014), compares the average correlation of each individual species with the rest of the aggregated community.

Usage

1
2
3
4
5
6
7
8
synchrony(
  df,
  time.var,
  species.var,
  abundance.var,
  metric = "Loreau",
  replicate.var = NA
)

Arguments

df

A data frame containing time, species and abundance columns and an optional column of replicates

time.var

The name of the time column

species.var

The name of the species column

abundance.var

The name of the abundance column

metric

The synchrony metric to return:

  • "Loreau": The default metric, calculates synchrony following Loreau and de Mazancourt (2008).

  • "Gross": Calculates synchrony following Gross et al. (2014).

replicate.var

The name of the optional replicate column

Details

The input data frame needs to contain columns for time, species and abundance; time.var, species.var and abundance.var are used to indicate which columns contain those variables. If multiple replicates are included in the data frame, that column should be specified with replicate.var. Each replicate should reflect a single experimental unit - there must be a single abundance value per species within each time point and replicate.

Value

The synchrony function returns a numeric synchrony value unless a replication column is specified in the input data frame. If replication is specified, the function returns a data frame with the following attributes:

References

Gross, Kevin, Bradley J. Cardinale, Jeremy W. Fox, Andrew Gonzalez, Michel Loreau, H. Wayne Polley, Peter B. Reich, and Jasper van Ruijven. (2014) "Species richness and the temporal stability of biomass production: A new analysis of recent biodiversity experiments." The American Naturalist 183, no. 1: 1-12. doi:10.1086/673915.

Loreau, Michel, and Claire de Mazancourt. (2008) "Species synchrony and its drivers: Neutral and nonneutral community dynamics in fluctuating environments." The American Naturalist 172, no. 2: E48-66. doi:10.1086/589746.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
data(knz_001d)
synchrony(knz_001d[knz_001d$subplot=="A_1",],
                     time.var = "year", 
                     species.var = "species",
                     abundance.var = "abundance") # for one subplot
## Not run: 
synchrony(knz_001d, 
             time.var = "year", 
             species.var = "species",
             abundance.var = "abundance",
             replicate.var = "subplot") # across all subplots
             
synchrony(knz_001d,  
             time.var = "year", 
             species.var = "species",
             abundance.var = "abundance",
             replicate.var = "subplot", 
             metric="Gross") # With Gross et al. (2014) metric.

## End(Not run)

Example output

[1] 0.1143231
   subplot  synchrony
1      A_1 0.11432310
2      A_2 0.12295182
3      A_3 0.03992713
4      A_4 0.11737766
5      A_5 0.14278080
6      B_1 0.10742278
7      B_2 0.14991168
8      B_3 0.17553016
9      B_4 0.13715743
10     B_5 0.16852972
11     C_1 0.18339868
12     C_2 0.13465684
13     C_3 0.12414105
14     C_4 0.11797081
15     C_5 0.17983562
16     D_1 0.10775534
17     D_2 0.06662489
18     D_3 0.10351275
19     D_4 0.10452284
20     D_5 0.11691193
   subplot    synchrony
1      A_1 -0.019353197
2      A_2  0.031247562
3      A_3  0.011286101
4      A_4  0.009084308
5      A_5  0.068688429
6      B_1 -0.023260347
7      B_2 -0.025615114
8      B_3 -0.038712037
9      B_4 -0.012843139
10     B_5  0.077822614
11     C_1 -0.002726641
12     C_2  0.002655186
13     C_3  0.031939954
14     C_4 -0.005922888
15     C_5  0.059659897
16     D_1  0.063482821
17     D_2 -0.053454668
18     D_3 -0.052435576
19     D_4 -0.092882844
20     D_5  0.009429645
Warning message:
In FUN(X[[i]], ...) :
  One or more species has non-varying abundance within a subplot and has been omitted

codyn documentation built on Dec. 1, 2020, 9:09 a.m.