rank_shift: Mean Rank Shifts

Description Usage Arguments Details Value References Examples

View source: R/rank_shift.R

Description

A measure of the relative change in species rank abundances, which indicates shifts in relative abundances over time (Collins et al. 2008). Mean rank shifts are calculated as the average difference in species' ranks between consecutive time periods, among species that are present across the entire time series.

Usage

1
2
3
4
5
6
7
rank_shift(
  df,
  time.var,
  species.var,
  abundance.var,
  replicate.var = as.character(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

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

rank_shift returns a data frame with the following columns:

References

Collins, Scott L., Katharine N. Suding, Elsa E. Cleland, Michael Batty, Steven C. Pennings, Katherine L. Gross, James B. Grace, Laura Gough, Joe E. Fargione, and Christopher M. Clark. (2008) "Rank clocks and plant community dynamics." Ecology 89, no. 12: 3534-41.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
 # Calculate mean rank shifts within replicates
 data(knz_001d)

 myoutput <- rank_shift(knz_001d,
                     time.var = "year",
                     species.var = "species",
                     abundance.var = "abundance",
                     replicate.var = "subplot")

 # Calculate mean rank shifts for a data frame with no replication

 myoutput_singlerep <- rank_shift(subset(knz_001d, subplot=="A_1"),
                           time.var = "year",
                           species.var = "species",
                           abundance.var = "abundance")

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