comparison insect_phenology_model.R @ 15:dd86ee185113 draft

Uploaded
author greg
date Mon, 05 Mar 2018 08:27:27 -0500
parents d1f2c0634354
children 309954bbe999
comparison
equal deleted inserted replaced
14:4aadc28100b0 15:dd86ee185113
244 } 244 }
245 } else { 245 } else {
246 if (life_stage=="Egg") { 246 if (life_stage=="Egg") {
247 title = paste(insect, ": Reps", replications, ":", life_stage, "Pop :", location, ": Lat", latitude, ":", start_date, "-", end_date, sep=" "); 247 title = paste(insect, ": Reps", replications, ":", life_stage, "Pop :", location, ": Lat", latitude, ":", start_date, "-", end_date, sep=" ");
248 legend_text = c(life_stage); 248 legend_text = c(life_stage);
249 columns = c(4); 249 columns = c(4);
250 } else if (life_stage=="Nymph") { 250 } else if (life_stage=="Nymph") {
251 stage = paste(life_stage_nymph, "Nymph Pop :", sep=" "); 251 stage = paste(life_stage_nymph, "Nymph Pop :", sep=" ");
252 title = paste(insect, ": Reps", replications, ":", stage, location, ": Lat", latitude, ":", start_date, "-", end_date, sep=" "); 252 title = paste(insect, ": Reps", replications, ":", stage, location, ": Lat", latitude, ":", start_date, "-", end_date, sep=" ");
253 legend_text = c(paste(life_stage_nymph, life_stage, sep=" ")); 253 legend_text = c(paste(life_stage_nymph, life_stage, sep=" "));
254 columns = c(2); 254 columns = c(2);
914 days = c(1:opt$num_days); 914 days = c(1:opt$num_days);
915 start_date = temperature_data_frame$DATE[1]; 915 start_date = temperature_data_frame$DATE[1];
916 end_date = temperature_data_frame$DATE[opt$num_days]; 916 end_date = temperature_data_frame$DATE[opt$num_days];
917 917
918 if (plot_generations_separately) { 918 if (plot_generations_separately) {
919 for (life_stage in life_stages) {} 919 for (life_stage in life_stages) {
920 if (life_stage == "Egg") { 920 if (life_stage == "Egg") {
921 # Start PDF device driver. 921 # Start PDF device driver.
922 dev.new(width=20, height=30); 922 dev.new(width=20, height=30);
923 file_path = paste(output_dir, "egg_pop_by_generation.pdf", sep="/"); 923 file_path = paste(output_dir, "egg_pop_by_generation.pdf", sep="/");
924 pdf(file=file_path, width=20, height=30, bg="white"); 924 pdf(file=file_path, width=20, height=30, bg="white");
969 render_chart(date_labels, "pop_size_by_generation", opt$plot_std_error, opt$insect, opt$location, latitude, start_date, end_date, days, maxval, 969 render_chart(date_labels, "pop_size_by_generation", opt$plot_std_error, opt$insect, opt$location, latitude, start_date, end_date, days, maxval,
970 opt$replications, life_stage, group=P, group_std_error=P.std_error, group2=F1, group2_std_error=F1.std_error, group3=F2, group3_std_error=F2.std_error); 970 opt$replications, life_stage, group=P, group_std_error=P.std_error, group2=F1, group2_std_error=F1.std_error, group3=F2, group3_std_error=F2.std_error);
971 # Turn off device driver to flush output. 971 # Turn off device driver to flush output.
972 dev.off(); 972 dev.off();
973 } 973 }
974 }
974 } else { 975 } else {
975 for (life_stage in life_stages) { 976 for (life_stage in life_stages) {
976 if (life_stage == "Egg") { 977 if (life_stage == "Egg") {
977 # Start PDF device driver. 978 # Start PDF device driver.
978 dev.new(width=20, height=30); 979 dev.new(width=20, height=30);