predpreyLV {primer} | R Documentation |
The Lotka-Volterra predator-prey model, for use with ode
in the deSolve
package.
predpreyLV(t, y, params)
t |
Argument for time |
y |
A vector of length 2, for population 1 and 2 |
params |
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>
Lotka, A.J. 1956. Elements of Mathematical Biology. Dover Publications, Inc.
Stevens. M.H.H. 2009. A Primer of Ecology with R. Use R! Series. Springer.
params1 <- c(b=.5, a=.01, s=.2, e=.1) Time <- seq(0,100, by=.1) # Set time here LV.out <- ode(c(H0=25,P0=5), Time, predpreyLV, params1) matplot(Time, (LV.out[,2:3]), type="l", ylab="Population Size")