lotkaprey: Lotka-Volterra Predator-Prey Model

lotkapreyR Documentation

Lotka-Volterra Predator-Prey Model

Description

Function implements Lotka-Volterra predator-prey model.

Usage

lotkaprey(a, b, c, d)
## S3 method for class 'lotkaprey'
plot(x, xlim, ylim, arrows = 8, ...)
## S3 method for class 'lotkaprey'
lines(x, N, P, time = 100, step = 0.2, ...)
## S3 method for class 'lotkaprey'
traj(x, N, P, time = 100, step = 1, ...)

Arguments

a, b, c, d

Lotka-Volterra model parameters: see Details.

x

"lotkaprey" result object.

xlim, ylim

Axis ranges.

arrows

Number of trend arrows displayed in the graph.

N, P

Initial prey and predator densities

time, step

Total time span and time step for which trajectories are found.

...

Other arguments passed to functions.

Details

The function uses the following parametrization for the prey N

dN/dt = a*N - b*N*P,

and for predator P

dP/dt = -c*P + d*b*N*P .

Function lotkaprey set ups the model, plot displays the phase diagram and isoclines, and lines adds trajectories. The trajectories can be generated with traj.

Krebs (2009, p. 191) hardly mentions these models, although they are the basis of more advanced models. The implementation is based on Stevens (2009).

Value

The function returns a "lotkaprey" result object which contains the input parameters and isocline values. Function traj returns trajectories with given starting values.

Note

The parametrization vary: the one in this function is the same as used in my lectures.

Author(s)

Jari Oksanen

References

Krebs, C. J. (2009) Ecology. Benjamin Cummings. 6 ed., 655 p.

Stevens, M.H.H. (2009) A Primer of Ecology with R. Springer.

See Also

lotkacomp, lotkapreyK, rmprey.

Examples

mod <- lotkaprey(0.5, 0.01, 0.2, 0.1)
mod
op <- par(no.readonly = TRUE)
layout(matrix(c(1,1,2, 1,1,3), nrow=2, byrow = TRUE))
plot(mod)
lines(mod, 200, 20)
lines(mod, 200, 30)
plot(traj(mod, 200, 20))
plot(traj(mod, 200, 30))
par(op)

jarioksa/ecostudy documentation built on June 27, 2022, 6:03 a.m.