Description Usage Arguments Details Value References Examples
View source: R/temporal_torus_translation.R
Performs a user-specified function on a null ecological community created via cyclic shift permutations (Harms et al. 2001, Hallett et al. 2014). The null community is formed by randomly selected different starting years for the time series of each species. This generates a null community matrix in which species abundances vary independently but within-species autocorrelation is maintained. The user-specified function must require a species x time input.
1 2 3 4 5 6 7 8 9 | cyclic_shift(
df,
time.var,
species.var,
abundance.var,
replicate.var = NA,
FUN,
bootnumber
)
|
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 replicate column. Defaults to |
FUN |
A function to calculate on the null community |
bootnumber |
Number of null simulations to run |
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.
The cyclic_shift function returns an S3 object of class "cyclic_shift" and parameter "out". The length of the "out" parameter is the number of null iterations as specified by bootnumber. If multiple replicates are specified, null values are averaged among replicates for each iteration, but a different cyclic shift permutation is applied to each replicate within an iteration.
Hallett, Lauren M., Joanna S. Hsu, Elsa E. Cleland, Scott L. Collins, Timothy L. Dickson, Emily C. Farrer, Laureano A. Gherardi, et al. "Biotic Mechanisms of Community Stability Shift along a Precipitation Gradient." Ecology 95, no. 6 (2014): 1693-1700.
Harms, Kyle E., Richard Condit, Stephen P. Hubbell, and Robin B. Foster. "Habitat Associations of Trees and Shrubs in a 50-Ha Neotropical Forest Plot." Journal of Ecology 89, no. 6 (2001): 947-59.
1 2 3 4 5 6 7 8 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.