comparison insect_phenology_model.R @ 91:b6b42e12e173 draft

Uploaded
author greg
date Fri, 01 Dec 2017 09:28:01 -0500
parents 7433448e313d
children fdc148a9695a
comparison
equal deleted inserted replaced
90:7433448e313d 91:b6b42e12e173
452 # Remove record of dead. 452 # Remove record of dead.
453 # Find how many new born. 453 # Find how many new born.
454 num_insects.newborn <- length(birth.vec[,1]) 454 num_insects.newborn <- length(birth.vec[,1])
455 vec.mat <- rbind(vec.mat, birth.vec) 455 vec.mat <- rbind(vec.mat, birth.vec)
456 # Update population size for the next day. 456 # Update population size for the next day.
457 n <- n - num_insects.death + num_insects.newborn 457 num_insects <- num_insects - num_insects.death + num_insects.newborn
458 458
459 # Aggregate results by day. 459 # Aggregate results by day.
460 tot.pop <- c(tot.pop, n) 460 tot.pop <- c(tot.pop, n)
461 # Egg. 461 # Egg.
462 s0 <- sum(vec.mat[,2] == 0) 462 s0 <- sum(vec.mat[,2] == 0)