spop {albopictus}  R Documentation 
An S4 class to represent an agestructured population
Description

spop
implements the deterministic and stochastic agestructured population dynamics models described in Erguler et al. 2016 and 2017 
add
introduces a batch of individuals with a given age, completed development cycles, and degree of development (default: 0) 
iterate
iterates the population for one day and calculates (overwrites) the number of dead individuals and the number of individuals designated to complete their development 
devtable
reads the number, age, and development cycle of individuals designated to complete their development 
developed
reads the total number of individuals designated to complete their development 
dead
reads the number of dead individuals after each iteration 
size
reads the total number of individuals
Details
This is an R implementation of the agestructured population dynamics models described in Erguler et al. 2016 and 2017. The spop
class records the number and age of individuals and implements two processes to exit from the population: development and death. The two processes act upon the population sequentially; survival is imposed prior to development. If the population survives for one day, then, it is allowed to grow and complete its development. Survival and development are defined either with an ageindependent daily probability, or an agedependent gamma or negative binomialdistributed probability.

stochastic
: a logical value indicating a deterministic or a stochastic population dynamics 
prob
: a character string indicating the basis of agedependent survival or development (gamma: gammadistributed, nbinom: negative binomialdistributed)
Examples
# Generate a population with stochastic dynamics
s < spop(stochastic=TRUE)
# Add 1000 20dayold individuals
add(s) < data.frame(number=1000,age=20)
# Iterate one day without death and assume development in 20 (+5) days (gammadistributed)
iterate(s) < data.frame(dev_mean=20,dev_sd=5,death=0)
print(developed(s))
# Iterate another day assuming no development but agedependent survival
# Let each individual survive for 20 days (+5) (gammadistributed)
iterate(s) < data.frame(death_mean=20,death_sd=5,dev=0)
print(dead(s))
# Note that the previous values of developed and dead will be overwritten by this command
# Generate a deterministic population and observe the difference
s < spop(stochastic=FALSE)
add(s) < data.frame(number=1000,age=20)
iterate(s) < data.frame(dev_mean=20,dev_sd=5,death=0)
print(developed(s))
iterate(s) < data.frame(death_mean=20,death_sd=5,dev=0)
print(dead(s))