data(coryphanthaA)
coryphanthaA <- as.tmatrix(coryphanthaA)
#initial abundances:
v0 <- c(100,0,0)
# run 500 simulations of 20 years with demographic stochasticity:
simu20.ds <- projectn(v0=v0, mat=coryphanthaA, time = 20, estdem=TRUE, nrep=500)
# compute declination probabilities
simu20.ds.dec <- decline(simu20.ds)
summary(simu20.ds.dec)
Run the code above in your browser using DataLab