predpreyRM {primer} | R Documentation |
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.
predpreyRM(t, y, p)
t |
Argument for time |
y |
A vector of length 2, for population 1 and 2 |
p |
Vector or list of parameters |
Returns a list of length one, for use with ode
in the deSolve
package.
Component 1 |
vector of the state variables, y. |
Hank Stevens <HStevens@muohio.edu>
Rosenzweig, M.L. and MacArthur, R.H. (1963) Graphical representation and stability conditions of predator-prey interactions. The American Naturalist, 97, 209–223.
Stevens. M.H.H. (2009) A Primer of Ecology with R. Use R! Series. Springer.
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')