comparison insect_phenology_model.R @ 76:8ca2b154e5cb draft

Uploaded
author greg
date Tue, 14 Nov 2017 14:33:46 -0500
parents 392980f72514
children aea954380d99
comparison
equal deleted inserted replaced
75:392980f72514 76:8ca2b154e5cb
27 opt <- args$options 27 opt <- args$options
28 28
29 parse_input_data = function(input_file, num_rows, num_columns) { 29 parse_input_data = function(input_file, num_rows, num_columns) {
30 # Read in the input temperature datafile into a data frame. 30 # Read in the input temperature datafile into a data frame.
31 temperature_data_frame <- read.csv(file=input_file, header=T, strip.white=TRUE, sep=",") 31 temperature_data_frame <- read.csv(file=input_file, header=T, strip.white=TRUE, sep=",")
32 if (num_rows == 6) { 32 if (num_columns == 6) {
33 # The input data has the following 6 columns: 33 # The input data has the following 6 columns:
34 # LATITUDE, LONGITUDE, DATE, DOY, TMIN, TMAX 34 # LATITUDE, LONGITUDE, DATE, DOY, TMIN, TMAX
35 # Add a column containing the daylight length for each day. 35 # Add a column containing the daylight length for each day.
36 temperature_data_frame <- add_daylight_length(latitude, temperature_data_frame, num_rows) 36 temperature_data_frame <- add_daylight_length(latitude, temperature_data_frame, num_rows)
37 } 37 }