# HG changeset patch # User greg # Date 1510689446 18000 # Node ID 5729eb737082043dc1e6f51367129f1fd0320f86 # Parent b701a134d6409d5b68ae7518ea20640303eba0a0 Uploaded diff -r b701a134d640 -r 5729eb737082 insect_phenology_model.R --- a/insect_phenology_model.R Tue Nov 14 14:49:29 2017 -0500 +++ b/insect_phenology_model.R Tue Nov 14 14:57:26 2017 -0500 @@ -28,7 +28,7 @@ parse_input_data = function(input_file, num_rows) { # Read in the input temperature datafile into a data frame. temperature_data_frame <- read.csv(file=input_file, header=T, strip.white=TRUE, sep=",") - if (ncol(temperature_data_frame) == 6) { + if (dim(temperature_data_frame)[2] == 6) { # The input data has the following 6 columns: # LATITUDE, LONGITUDE, DATE, DOY, TMIN, TMAX # Add a column containing the daylight length for each day.