getDiagonal: Calculate Jacobian diagonal from flux values

View source: R/get_diagonal.R

getDiagonalR Documentation

Calculate Jacobian diagonal from flux values

Description

This function finds diagonal values to be used in the Jacobian matrix based on flux values.

Usage

getDiagonal(MR, dead_names = NULL, BM = NULL, FM = NULL, AE = NULL)

Arguments

MR

(required) A named numeric vector with non-predatory mortality rates for all compartments (per unit time, t-1). If not provided, the input of BM, FM, AE, and GE are required.

dead_names

(optional) Character vector with all names of detritus and nutrient compartments.

BM

(required when MR is NULL, and when dead compartments are included) A named numeric vector with biomasses of all compartments. Must be in the same order as MR.

FM

(required if MR is NULL and when dead compartments are included) A named square flowmatrix, source compartments as rows, sink compartments as columns. Should NOT contain external compartments. Order of names must be equal to MR.

AE

(required if MR is NULL and when dead compartments are included) A named numeric vector with assimilation efficiencies of all compartments. Must be in the same order as MR. Must be a fraction i.e. between 0 and 1.

Details

Diagonal values for species are equal to their natural death rate (unit t-1). Natural death rates can be provided directly as MR, or assumed to be non-predatory mortality calculated from consumption rates and physiological parameters. Diagonal values for dead (detritus) compartments are based on the total amount of assimilated detritus in all consumers of detritus and the biomass of the detritus compartments. This function implements the equations from from Neutel & Thorne (2014). The input should be named according to the food web compartment names. It is important to review the units of the input data.

Value

This function returns a named numeric vector with diagonal values for the species in the food web (per unit time, t-1).

References

Neutel, A.M., Thorne, M.A.S., 2014. Interaction strengths in balanced carbon cycles and the absence of a relation between ecosystem complexity and stability. Ecol. Lett. 17, 651–661. https://doi.org/10.1111/ele.12266


dswdejonge/fwstability documentation built on Dec. 7, 2022, 7:24 p.m.