community_stability: Community Stability

Description Usage Arguments Details Value References Examples

View source: R/community_stability.R

Description

Calculates the stability of the overall community over time as the temporal mean / temporal standard deviation of aggregate species abundances (Tilman 1999).

Usage

1
community_stability(df, time.var, abundance.var, 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

abundance.var

The name of the abundance column

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 should be a single community represented within each time point and replicate.

Value

The community_stability function returns a numeric stability 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 columns:

References

Tilman, D. "The Ecological Consequences of Changes in Biodiversity: A Search for General Principles." Ecology 80, no. 5 (July 1999): 1455-74. doi:10.1890/0012-9658(1999)080[1455:TECOCI]2.0.CO;2.

Examples

1
2
3
4
5
6
7
8
data(knz_001d)
community_stability(knz_001d[knz_001d$subplot=="A_1",], 
                     time.var = "year", 
                     abundance.var = "abundance") # for one subplot
community_stability(knz_001d,
                     time.var = "year", 
                     abundance.var = "abundance",
                     replicate.var = "subplot") # across all subplots

Example output

[1] 4.123316
   subplot stability
1      A_1  4.123316
2      A_2  3.986904
3      A_3  6.514939
4      A_4  4.322140
5      A_5  3.415329
6      B_1  4.479464
7      B_2  3.442573
8      B_3  3.551204
9      B_4  3.937452
10     B_5  3.282738
11     C_1  3.165395
12     C_2  3.703476
13     C_3  3.744142
14     C_4  5.057938
15     C_5  3.207514
16     D_1  4.497318
17     D_2  6.222124
18     D_3  4.504468
19     D_4  6.197067
20     D_5  5.246663

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