rmprey | R Documentation |
The function sets up a Rosenzweig-MacArthur model of predator-prey relationship. The prey has density-dependent control, and predator has type II functional response.
rmprey(b, K, w, D, e, s) ## S3 method for class 'rmprey' plot(x, xlim, ylim, arrows = 5, ...) ## S3 method for class 'rmprey' lines(x, N, P, time = 100, step = 0.2, ...) ## S3 method for class 'rmprey' traj(x, N, P, time = 100, step = 1, ...)
b, K, w, D, e, s |
Model parameters: see Details. |
x |
An |
xlim, ylim |
Axis limits. |
arrows |
Number of trend arrows displayed in the graphs. |
N, P |
Initial prey and predator densities. |
time, step |
Total time span and time step for which trajectories are found. |
... |
Other parameters passed to graphical functions. |
The prey N and predator P population changes are given by equations:
dN/dt = b*N(1-N/K) - w*(N/(D+N))*P
dP/dt = e*w*(N/(D+N))*P - s*P
where b is the prey population growth rate, K is the
prey carrying capacity, w is the attack rate, D is the
handling time in in type II functional response, e is the
production efficiency of the predator, and s is the predator
mortality rate. Except for parameters K and D these are
the same parameters as in the Lotka-Volterra predator-prey model
(lotkaprey
).
The current implementation is based on Stevens (2009). This is the main predator–prey model in Krebs (2009, p. 191–195). However, it seems that his graphics are conceptual rather than produced by rigorous mathematics, and cannot be exactly reproduced with the used functional response models.
Function rmprey
set ups the model, and plot
draws the
phase diagram.
Function rmprey
returns an object of class "rmprey"
with following items:
preyfun |
A quadratic function giving the prey isocline. |
invpreyfun |
The inverse of |
preyopt, preytop, preylimits |
Descriptive statistics for the
prey isocline: the location of the peak, the height of the peak, and
the limits of the prey isocline. The limits are the real roots of
|
prediso |
The predator isocline. |
b, K, w, s, e, D |
Model parameters. |
call |
The function call. |
Jari Oksanen
Krebs, C. J. (2009) Ecology. Benjamin Cummings. 6 ed., 655 p.
Stevens, M.H.H. (2009) A Primer of Ecology with R. Springer.
lotkaprey
, lotkapreyK
.
mod <- rmprey(0.8, 1000, 5, 400, 0.07, 0.2) mod op <- par(no.readonly = TRUE) layout(matrix(c(1,1, 1,1, 2,2), ncol = 2, byrow=TRUE)) plot(mod) lines(mod, 1000, 100) plot(traj(mod, 1000, 100)) par(op)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.