Skip to contents

This function should be called with a non-interacting model (where there is only external mortality and external encounter) and an interaction matrix. The external encounter and mortality rates will then be decreased by the amount of the predation encounter and mortality that is created by that interaction matrix.

Usage

makeInteracting(params, interaction, interaction_resource = NULL)

Arguments

params

A MizerParams object

interaction

An interaction matrix where entry (i, j) gives the strength with which species i preys on j.

interaction_resource

A numeric vector of length equal to the number of species giving the interaction strength of each species with the resource. Defaults to zero (no resource interaction). Pass the original values when reinstating resource interactions that were zeroed by makeNoninteracting().

Value

The modified MizerParams object

Details

If predation would exceed total mortality or encounter for a species, a warning is issued and negative values are truncated to zero. This can cause the resulting model to diverge from the steady state.

Typically used internally by matchDiet()