Mercurial > repos > greg > insect_phenology_model
comparison insect_phenology_model.R @ 59:1d4e864b7720 draft
Uploaded
author | greg |
---|---|
date | Mon, 13 Nov 2017 12:14:26 -0500 |
parents | 2fd7b1f7153d |
children | a3bdf0d35d1d |
comparison
equal
deleted
inserted
replaced
58:f64704e0ad97 | 59:1d4e864b7720 |
---|---|
195 | 195 |
196 # Read in the input temperature datafile into a Data Frame object. | 196 # Read in the input temperature datafile into a Data Frame object. |
197 # The input data currently must have 6 columns: | 197 # The input data currently must have 6 columns: |
198 # LATITUDE, LONGITUDE, DATE, DOY, TMIN, TMAX | 198 # LATITUDE, LONGITUDE, DATE, DOY, TMIN, TMAX |
199 temperature_data <- read.csv(file=opt$input, header=T, strip.white=TRUE, sep=",") | 199 temperature_data <- read.csv(file=opt$input, header=T, strip.white=TRUE, sep=",") |
200 start_date <- temperature_data[c(1:1), 3] | 200 start_date <- temperature_data[1, 3] |
201 end_date <- temperature_data[c(opt$num_days:opt$num_days), 3] | 201 end_date <- temperature_data[opt$num_days, 3] |
202 latitude <- temperature_data[1, 1] | 202 latitude <- temperature_data[1, 1] |
203 daylight_length_vector <- get_daylight_length(latitude, temperature_data, opt$num_days) | 203 daylight_length_vector <- get_daylight_length(latitude, temperature_data, opt$num_days) |
204 | 204 |
205 cat("Start date: ", start_date, "\n") | 205 cat("Start date: ", start_date, "\n") |
206 cat("End date: ", end_date, "\n") | 206 cat("End date: ", end_date, "\n") |