Learn R Programming

primer (version 0.1)

predpreyRM: Rosenzweig-MacArthur predator-prey model

Description

An implementation of a predator-prey model, after Rosenzweig and MacArthur (1963). Includes prey density-dependence, and a type-II predator functional response. For use with ode in the deSolve package.

Usage

predpreyRM(t, y, p)

Arguments

t
Argument for time
y
A vector of length 2, for population 1 and 2
p
Vector or list of parameters

Value

  • Returns a list of length one, for use with ode in the deSolve package.
  • Component 1vector of the state variables, y.

References

M.L. Rosenzweig and R.H. MacArthur. Graphical representation and stability conditions of predator-prey interactions. American Naturalist, 97:209--223, 1963.

Stevens. M.H.H. 2009. A Primer of Ecology with R. Use R! Series. Springer.

See Also

predpreyLV

Examples

Run this code
library(deSolve)
pars <- c(b = .8, e = 0.07, s = .2, w = 5, D = 400, alpha = 0.001)
Time <- 50
RM1 <- ode(c(900,120), 1:Time, predpreyRM, pars)
matplot(1:Time, RM1[,-1], type='l')

Run the code above in your browser using DataLab