Skip to contents

Returns the diet matrix with one row for each predator species and one column for each prey species and other ecosystem components. The entries give the rate at which biomass flows from the prey species to the predator species.

Usage

getDietMatrix(params, min_w_pred = 0, max_w_pred = Inf)

Arguments

params

A MizerParams object

min_w_pred

The minimum weight of predators to include in the diet matrix. Default is 0.

max_w_pred

The maximum weight of predators to include in the diet matrix. Default is Inf.

Value

A matrix with dimnames predator and prey containing the rates of biomass flow from a prey species to a predator species (or that part of the predator species population that is larger than min_w_pred).

Details

Note that the diet matrix has the absolute rates of biomass flow, not the proportions of the diet.

If min_w_pred or max_w_pred are set, then the diet matrix only represents the flow of biomass into the part of the predator species population that has sizes in the specified range. This may make the returned diet matrix correspond more closely to diet matrices found in the literature, which are often estimated from observation of large individuals only or of juveniles only.

Examples

dimnames(getDietMatrix(NS_params))
#> $predator
#>  [1] "Sprat"   "Sandeel" "N.pout"  "Herring" "Dab"     "Whiting" "Sole"   
#>  [8] "Gurnard" "Plaice"  "Haddock" "Cod"     "Saithe" 
#> 
#> $prey
#>  [1] "Sprat"    "Sandeel"  "N.pout"   "Herring"  "Dab"      "Whiting" 
#>  [7] "Sole"     "Gurnard"  "Plaice"   "Haddock"  "Cod"      "Saithe"  
#> [13] "Resource" "External"
#> 
getDietMatrix(NS_params)["Cod", ]
#>        Sprat      Sandeel       N.pout      Herring          Dab      Whiting 
#>  86473748535 442566895283  99626958953 586832187946   3872120553  77030953225 
#>         Sole      Gurnard       Plaice      Haddock          Cod       Saithe 
#>  36566692606  12479780619 338341387564 146059546289  53972800684  39772246157 
#>     Resource     External 
#> 107418940729            0