perturbation: Perturbation

View source: R/perturbation.R

perturbationR Documentation

Perturbation

Description

A perturbation object which defines the number of times a perturbation is applied, its duration for each time, the effects on the growth rates and/or the abundances. The perturbation is assumed to have each time the same effect on the species' growth rates and/or abundances. Note that perturbations should be separated by at least one time point. If perturbations are repeatedly applied, the growth rate changes will take effect only in the first time point of the duration and will then set back to the original values at the end of the duration. The abundance changes will be applied at each time point at the duration. Specifically, growth changes in Ricker will be applied to the carrying capacity vector. In the neutral and SOI models, which do not implement growth rates, they will be applied to the metacommunity composition (neutral model) and immigration vector (SOI model), such that immigration of species with increased "growth rate" is more likely during perturbation. For the neutral model, capacityConstant is always set to TRUE. If capacityConstant is false in the SOI model, but the total abundance is larger than the number of individuals, randomly selected individuals will be removed until the total abundance equals the number of individuals.

Usage

perturbation(times = c(), durations = c(), growthchanges = c(),
  numberchanges = c(), deathrate = NA, capacityConstant = FALSE)

Arguments

times

a vector of time points at which perturbations take place

durations

a vector of the same length as times that specifies the duration of each perturbation

growthchanges

(optional) a vector of the same length as species in the (meta-)community that describes by what amount each species growth rate is decreased or increased (zero: no change, minus: decrease, else increase)

numberchanges

(optional) a vector of the same length as species in the (meta-)community that describes by what amount the abundance of each species is decreased or increased (zero: no change, minus: decrease, else increase, NA: remove a species from the community); species that have reached zero will not be altered

deathrate

(optional) a constant (neutral model) or a vector (SOI model) with altered death rates

capacityConstant

determines whether the total abundance is allowed to change or not (if capacityConstant is TRUE, the abundance of all non-increasing species will be decreased by an equal amount to keep the total abundance constant)

Value

a perturbation object

Examples

# define three perturbations on a community with 10 species
per=perturbation(times=c(1,10,15),durations=rep(1,3),numberchanges=c(10,-10,rep(0,8)))


hallucigenia-sparsa/seqtime documentation built on Jan. 9, 2023, 11:53 p.m.