mean_rank_shift {codyn}R Documentation

Mean Rank Shifts

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

mean_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

mean_rank_shift returns a data frame with the following columns:


[Package codyn version 2.0.5 Index]