Mercurial > repos > greg > insect_phenology_model
comparison insect_phenology_model.R @ 137:97a56ff8f32a draft
Uploaded
author | greg |
---|---|
date | Wed, 21 Nov 2018 11:17:58 -0500 |
parents | 4540d65f6fa3 |
children | 6b772cf48160 |
comparison
equal
deleted
inserted
replaced
136:dbcd6ed8e3ee | 137:97a56ff8f32a |
---|---|
1051 # Number of births. | 1051 # Number of births. |
1052 num_insects.newborn = length(birth.vector[,1]); | 1052 num_insects.newborn = length(birth.vector[,1]); |
1053 vector.matrix = rbind(vector.matrix, birth.vector); | 1053 vector.matrix = rbind(vector.matrix, birth.vector); |
1054 # Update population size for the next day. | 1054 # Update population size for the next day. |
1055 num_insects = num_insects - num_insects.death + num_insects.newborn; | 1055 num_insects = num_insects - num_insects.death + num_insects.newborn; |
1056 } | 1056 } else { |
1057 else { | 1057 if (is.null(doy_zero_insects)) { |
1058 if (is.null(doy_zero_insects) { | |
1059 # Only set the doy for zero insects if | 1058 # Only set the doy for zero insects if |
1060 # it has not yet been set. | 1059 # it has not yet been set. |
1061 doy_zero_insects = doy; | 1060 doy_zero_insects = doy; |
1062 } | 1061 } |
1063 } | 1062 } |