lotkaVolterra: Simulate Lotka-Volterra Predator-Prey Model

View source: R/lotkaVolterra.R

lotkaVolterraR Documentation

Simulate Lotka-Volterra Predator-Prey Model

Description

Simulate the time dynamics of the Lotka-Volterra model, and recreate figure 4.8

Usage

lotkaVolterra(perturb = 1.05, viewcode = FALSE)

Arguments

perturb

is a multiplier that is used to perturb the model away from equilibrium. The default 1.05 perturbs by 5 percent away from equilibrium

viewcode

TRUE or FALSE (default) indicating whether to print the function code

Value

a list containing the jacobian matrix and dominant eigenvalue, and creates figure 4.8

Examples

# Recreate figure 4.8 exactly
lotkaVolterra(perturb = 1.05)
# create a larger initial perturbation away from equilibrim
lotkaVolterra(perturb = 1.25)
# View the code
lotkaVolterra(viewcode = TRUE)

tessington/quantecol documentation built on June 1, 2025, 9:06 p.m.