predpreyLV {primer}R Documentation

The Lotka-Volterra Predator-prey Model

Description

The Lotka-Volterra predator-prey model, for use with ode in the deSolve package.

Usage

predpreyLV(t, y, params)

Arguments

t

Argument for time

y

A vector of length 2, for population 1 and 2

params

Vector or list of parameters

Value

Returns a list of length one, for use with ode in the deSolve package.

Component 1

vector of the state variables, y.

Author(s)

Hank Stevens <HStevens@muohio.edu>

References

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.

See Also

predpreyRM

Examples


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")


[Package primer version 1.2.0 Index]