changeset 60:a3bdf0d35d1d draft

Uploaded
author greg
date Mon, 13 Nov 2017 12:26:48 -0500
parents 1d4e864b7720
children 82668ca72b08
files insect_phenology_model.R
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/insect_phenology_model.R	Mon Nov 13 12:14:26 2017 -0500
+++ b/insect_phenology_model.R	Mon Nov 13 12:26:48 2017 -0500
@@ -35,7 +35,7 @@
     for (i in 1:num_days) {
         # Get the day of the year from the current row
         # of the temperature data for computation.
-        doy <- temperature_data[c(i:i), 4]
+        doy <- temperature_data[i, 4]
         theta <- 0.2163108 + 2 * atan(0.9671396 * tan(0.00860 * (doy - 186)))
         phi <- asin(0.39795 * cos(theta))
         # Compute the length of daylight for the day of the year.
@@ -234,7 +234,7 @@
     # All the days included in the input temperature dataset.
     for (row in 1:opt$num_days) {
         # Get the integer day of the year for the current row.
-        doy <- temperature_data[c(row:row), 4]
+        doy <- temperature_data[row, 4]
         # Photoperiod in the day.
         photoperiod <- daylight_length_vector[row]
         temp.profile <- get_temperature_at_hour(latitude, temperature_data, daylight_length_vector, row, opt$num_days)