Mercurial > repos > greg > extract_ipm_date_interval
comparison extract_ipm_date_interval.R @ 1:459b422e5df6 draft
Uploaded
| author | greg |
|---|---|
| date | Wed, 08 Aug 2018 14:15:59 -0400 |
| parents | 1868b7913590 |
| children | 8b068f78e7fd |
comparison
equal
deleted
inserted
replaced
| 0:1868b7913590 | 1:459b422e5df6 |
|---|---|
| 396 P_total_adults = temperature_data_frame$TOTALADULT.P; | 396 P_total_adults = temperature_data_frame$TOTALADULT.P; |
| 397 if (plot_std_error) { | 397 if (plot_std_error) { |
| 398 P_total_adults.std_error = temperature_data_frame$TOTALADULT.P.SE; | 398 P_total_adults.std_error = temperature_data_frame$TOTALADULT.P.SE; |
| 399 } | 399 } |
| 400 } | 400 } |
| 401 if (process_total) { | |
| 402 P_all_total = temperature_data_frame$ALL.TOTAL.P; | |
| 403 if (plot_std_error) { | |
| 404 P_all_total.std_error = temperature_data_frame$ALL.TOTAL.P.SE; | |
| 405 } | |
| 406 } | |
| 401 } else if (file_name == "02_generation_F1.csv") { | 407 } else if (file_name == "02_generation_F1.csv") { |
| 402 if (process_eggs) { | 408 if (process_eggs) { |
| 403 F1_eggs = temperature_data_frame$EGG.F1; | 409 F1_eggs = temperature_data_frame$EGG.F1; |
| 404 if (plot_std_error) { | 410 if (plot_std_error) { |
| 405 F1_eggs.std_error = temperature_data_frame$EGG.F1.SE; | 411 F1_eggs.std_error = temperature_data_frame$EGG.F1.SE; |
| 445 F1_total_adults = temperature_data_frame$TOTALADULT.F1; | 451 F1_total_adults = temperature_data_frame$TOTALADULT.F1; |
| 446 if (plot_std_error) { | 452 if (plot_std_error) { |
| 447 F1_total_adults.std_error = temperature_data_frame$TOTALADULT.F1.SE; | 453 F1_total_adults.std_error = temperature_data_frame$TOTALADULT.F1.SE; |
| 448 } | 454 } |
| 449 } | 455 } |
| 456 if (process_total) { | |
| 457 F1_all_total = temperature_data_frame$ALL.TOTAL.F1; | |
| 458 if (plot_std_error) { | |
| 459 F1_all_total.std_error = temperature_data_frame$ALL.TOTAL.F1.SE; | |
| 460 } | |
| 461 } | |
| 450 } else if (file_name == "03_generation_F2.csv") { | 462 } else if (file_name == "03_generation_F2.csv") { |
| 451 if (process_eggs) { | 463 if (process_eggs) { |
| 452 F2_eggs = temperature_data_frame$EGG.F2; | 464 F2_eggs = temperature_data_frame$EGG.F2; |
| 453 if (plot_std_error) { | 465 if (plot_std_error) { |
| 454 F2_eggs.std_error = temperature_data_frame$EGG.F2.SE; | 466 F2_eggs.std_error = temperature_data_frame$EGG.F2.SE; |
| 492 } | 504 } |
| 493 if (process_total_adults) { | 505 if (process_total_adults) { |
| 494 F2_total_adults = temperature_data_frame$TOTALADULT.F2; | 506 F2_total_adults = temperature_data_frame$TOTALADULT.F2; |
| 495 if (plot_std_error) { | 507 if (plot_std_error) { |
| 496 F2_total_adults.std_error = temperature_data_frame$TOTALADULT.F2.SE; | 508 F2_total_adults.std_error = temperature_data_frame$TOTALADULT.F2.SE; |
| 509 } | |
| 510 } | |
| 511 if (process_total) { | |
| 512 F2_all_total = temperature_data_frame$ALL.TOTAL.F2; | |
| 513 if (plot_std_error) { | |
| 514 F2_all_total.std_error = temperature_data_frame$ALL.TOTAL.F2.SE; | |
| 497 } | 515 } |
| 498 } | 516 } |
| 499 } | 517 } |
| 500 } | 518 } |
| 501 | 519 |
| 600 if (process_total) { | 618 if (process_total) { |
| 601 life_stage = "Total"; | 619 life_stage = "Total"; |
| 602 # Total population size for egg, nymph and adult by generation. | 620 # Total population size for egg, nymph and adult by generation. |
| 603 file_path = get_file_path(life_stage, "total_pop_by_generation.pdf") | 621 file_path = get_file_path(life_stage, "total_pop_by_generation.pdf") |
| 604 maxval = max(total_adults+eggs+total_nymphs) + 100; | 622 maxval = max(total_adults+eggs+total_nymphs) + 100; |
| 605 # P == total_adults | 623 prepare_plot(life_stage, file_path, maxval, ticks, date_labels, chart_type, params_hash$plot_std_error, |
| 606 # P.std_error == total_adults.std_error | 624 params_hash$insect, params_hash$location, latitude, start_date, end_date, total_days_vector, |
| 607 # F1 == eggs | 625 params_hash$replications, group=P_all_total, group_std_error=P_all_total.std_error, group2=F1_all_total, |
| 608 # F1.std_error == eggs.std_error | 626 group2_std_error=F1_all_total.std_error, group3=F2_all_total, group3_std_error=F2_all_total.std_error); |
| 609 # F2 == ??? | |
| 610 # F2.std_error == ??? | |
| 611 # FIXME: testing demonstrates that P and F1 are properly assigned | |
| 612 # above, but F2 cannot be determined. F2 should undoubtedly be | |
| 613 # total_nymphs, but the data is not the same bewteen the output | |
| 614 # from the insect_phenology_model tool and the date interval from | |
| 615 # this tool. We won't plot the total until we get time to figure | |
| 616 # this out. | |
| 617 #prepare_plot(life_stage, file_path, maxval, ticks, date_labels, chart_type, params_hash$plot_std_error, | |
| 618 # params_hash$insect, params_hash$location, latitude, start_date, end_date, total_days_vector, | |
| 619 # params_hash$replications, group=total_adults, group_std_error=total_adults.std_error, group2=eggs, | |
| 620 # group2_std_error=eggs.std_error, group3=total_nymphs, group3_std_error=total_nymphs.std_error); | |
| 621 } | 627 } |
| 622 } else { | 628 } else { |
| 623 chart_type = "pop_size_by_life_stage"; | 629 chart_type = "pop_size_by_life_stage"; |
| 624 if (process_eggs) { | 630 if (process_eggs) { |
| 625 # Egg population size. | 631 # Egg population size. |
