Learn R Programming

fluxweb (version 2.0.0)

create.jacob: Compute the Jacobian matrix

Description

Compute the Jacobian matrix

Usage

create.jacob(
  val.mat,
  biomasses,
  efficiencies,
  metabolic.types,
  ef.level = "prey"
)

Value

A matrix representing the Jacobian matrix of the dynamical system associated with the fluxes from the fluxing function.

Arguments

val.mat

A matrix describing fluxes between species (usually a result of fluxing function).

biomasses

A vector of species biomasses.

efficiencies

A vector or an array of conversion efficiencies of species in the adjacency matrix.

metabolic.types

A vector containing information on species type ("detritus", "plant" or "animal")

ef.level

Set to "prey" if efficiencies are defined by prey, "pred" if they are a property of the predator, link.specific if they depend on both consumer and resource identity.

Author

Benoit Gauzens, benoit.gauzens@gmail.com

Examples

Run this code
# First compute species per unit biomass metabolic rates:
losses = 0.15 * groups.level$bodymasses^(-0.25)


val.mat = fluxing(groups.level$mat, 
                  groups.level$biomasses, 
                  losses, 
                  groups.level$efficiencies, 
                  bioms.pref = TRUE, 
                  ef.level = "prey")
                  
# define metabolic types                   

met.types = rep("animal", nrow(val.mat))
met.types[groups.level$efficiencies == 0.545] = "plant"
met.types[groups.level$efficiencies == 0.158] = "detritus"

create.jacob(val.mat, 
               groups.level$biomasses, 
               groups.level$efficiencies, 
               met.types,
               ef.level = "prey")
               

Run the code above in your browser using DataLab