Mercurial > repos > greg > insect_phenology_model
changeset 65:8f3dba5dddb5 draft
Uploaded
author | greg |
---|---|
date | Tue, 14 Nov 2017 12:53:34 -0500 |
parents | e2f2780f5c14 |
children | f575148ce157 |
files | insect_phenology_model.R |
diffstat | 1 files changed, 3 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/insect_phenology_model.R Tue Nov 14 11:35:11 2017 -0500 +++ b/insect_phenology_model.R Tue Nov 14 12:53:34 2017 -0500 @@ -42,7 +42,9 @@ daylight_length_vector[i] <- 24 - (24 / pi * acos((sin(p * pi / 180) + sin(latitude * pi / 180) * sin(phi)) / (cos(latitude * pi / 180) * cos(phi)))) } # Append daylight_length_vector as a new column to temperature_data_matrix. - temperature_data_matrix <- cbind(temperature_data_matrix, daylight_length_vector) + rbind(temperature_data_matrix[, 7], daylight_length_vector) + # Give the new column a name. + colnames(temperature_data_matrix)[7] <- c("DAYLEN") } get_temperature_at_hour = function(latitude, temperature_data_matrix, row, num_days) {