Mercurial > repos > greg > insect_phenology_model
changeset 92:fdc148a9695a draft
Uploaded
author | greg |
---|---|
date | Fri, 01 Dec 2017 09:38:04 -0500 |
parents | b6b42e12e173 |
children | 06acadd38824 |
files | insect_phenology_model.R |
diffstat | 1 files changed, 3 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/insect_phenology_model.R Fri Dec 01 09:28:01 2017 -0500 +++ b/insect_phenology_model.R Fri Dec 01 09:38:04 2017 -0500 @@ -213,7 +213,7 @@ # Generation, Stage, degree-days, T, Diapause. vec.ini <- c(0, 3, 0, 0, 0) # Overwintering, previttelogenic, degree-days=0, T=0, no-diapause. - vec.mat <- rep(vec.ini, n) + vec.mat <- rep(vec.ini, num_insects) # Complete matrix for the population. vec.mat <- base::t(matrix(vec.mat, nrow=5)) # Time series of population size. @@ -240,7 +240,7 @@ # Newborn. birth.vec <- NULL # All individuals. - for (i in 1:n) { + for (i in 1:num_insects) { # Find individual record. vec.ind <- vec.mat[i,] # First of all, still alive? @@ -457,7 +457,7 @@ num_insects <- num_insects - num_insects.death + num_insects.newborn # Aggregate results by day. - tot.pop <- c(tot.pop, n) + tot.pop <- c(tot.pop, num_insects) # Egg. s0 <- sum(vec.mat[,2] == 0) # Young nymph.