Learn R Programming

primer (version 1.2.0)

dlogistic: Discrete Logistic Growth

Description

Single species discrete logistic growth -- a difference equation. A function for continuous logistic growth, for use with ode in the deSolve package, using method = 'euler' and integer time steps.

Usage

dlogistic(t, y, p)

Arguments

t

times points that will return N

y

N

p

a vector of labeled logistic growth parameters; the first must be labeled rd, and the second must be labeled alpha (the value of alpha is 1/K).

Value

Returns of list of one component (required by ode).

Details

Of the form, $$N_{t+1} - N_{t} = r_d N_{t}\left(1 - \alpha N_{t}\right)$$

References

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

See Also

clogistic, lvcompg

Examples

Run this code
# NOT RUN {
library(deSolve)
# MUST use the 'euler' integration method with integer time steps
p <- c(rd=1, alpha=.01)
time <- 0:10
initialN <- 10
out <- ode(y=initialN, times=time,
             func=dlogistic, parms=p, method='euler')
plot(time, out[,-1], type='l')

# }

Run the code above in your browser using DataLab