
Last chance! 50% off unlimited learning
Sale ends in
projection(dynamic, population, timesteps = 1)
is.pop_projection(x)
"plot"(x, states = NULL, patches = 1, ...)
dynamic
dynamic
. If a dataframe,
it should have only one row (as in the examples below), or as many rows as
patches in the metapopulation if a multi-patch landscape has been defined
for dynamic
(using landscape
). If a multi-patch
landscape has been defined for dynamic
, but population
has
only one row or is a vector, this population will be duplicated for all
patches in the landscape.pop_projection
object, or an object to be tested as onedynamic
object
used to run the projection that should be plotted. By default all of them
are plotted.pop_projection
# set up a three-stage model
stasis_egg <- tr(egg ~ egg, p(0.6))
stasis_larva <- tr(larva ~ larva, p(0.4))
stasis_adult <- tr(adult ~ adult, p(0.9))
hatching <- tr(larva ~ egg, p(0.35))
fecundity <- tr(egg ~ adult, r(20))
pupation <- tr(adult ~ larva, p(0.2))
pd <- dynamic(stasis_egg,
stasis_larva,
stasis_adult,
hatching,
pupation,
fecundity)
population <- data.frame(egg = 1200, larva = 250, adult = 50)
# simulate for 50 timesteps, 30 times
proj <- projection(dynamic = pd,
population = population,
timesteps = 50)
is.pop_projection(proj)
par(mfrow = c(3, 1))
plot(proj)
Run the code above in your browser using DataLab