Mercurial > repos > greg > insect_phenology_model
comparison insect_phenology_model.R @ 104:d6e37828b094 draft
Uploaded
author | greg |
---|---|
date | Tue, 05 Dec 2017 11:13:23 -0500 |
parents | 4d9e40d8af0f |
children | aa1890120743 |
comparison
equal
deleted
inserted
replaced
103:4d9e40d8af0f | 104:d6e37828b094 |
---|---|
627 pdf(file=opt$output, width=20, height=40, bg="white") | 627 pdf(file=opt$output, width=20, height=40, bg="white") |
628 par(mar=c(5, 6, 4, 4), mfrow=c(3, 1)) | 628 par(mar=c(5, 6, 4, 4), mfrow=c(3, 1)) |
629 | 629 |
630 # Data analysis and visualization plots | 630 # Data analysis and visualization plots |
631 # only within a single calendar year. | 631 # only within a single calendar year. |
632 day.all <- c(1:opt$num_days) | 632 days <- c(1:opt$num_days) |
633 start_date <- temperature_data_frame$DATE[1] | 633 start_date <- temperature_data_frame$DATE[1] |
634 end_date <- temperature_data_frame$DATE[opt$num_days] | 634 end_date <- temperature_data_frame$DATE[opt$num_days] |
635 | 635 |
636 # Subfigure 1: population size by life stage | 636 # Subfigure 1: population size by life stage |
637 maxval <- max(eggs+eggs.std_error, nymphs+nymphs.std_error, adults+adults.std_error) | 637 maxval <- max(eggs+eggs.std_error, nymphs+nymphs.std_error, adults+adults.std_error) |
638 render_chart("pop_size_by_life_stage", opt$insect, opt$location, latitude, start_date, end_date, days.all, maxval, | 638 render_chart("pop_size_by_life_stage", opt$insect, opt$location, latitude, start_date, end_date, days, maxval, |
639 opt$std_error_plot, adults, nymphs, eggs, adults.std_error, nymphs.std_error, eggs.std_error) | 639 opt$std_error_plot, adults, nymphs, eggs, adults.std_error, nymphs.std_error, eggs.std_error) |
640 | |
641 # Subfigure 2: population size by generation | 640 # Subfigure 2: population size by generation |
642 maxval <- max(F2) | 641 maxval <- max(F2) |
643 render_chart("pop_size_by_generation", opt$insect, opt$location, latitude, start_date, end_date, days.all, maxval, | 642 render_chart("pop_size_by_generation", opt$insect, opt$location, latitude, start_date, end_date, days, maxval, |
644 opt$std_error_plot, P, F1, F2, P.std_error, F1.std_error, F2.std_error) | 643 opt$std_error_plot, P, F1, F2, P.std_error, F1.std_error, F2.std_error) |
645 | |
646 | |
647 # Subfigure 3: adult population size by generation | 644 # Subfigure 3: adult population size by generation |
648 maxval <- max(F2_adults) + 100 | 645 maxval <- max(F2_adults) + 100 |
649 render_chart("adult_pop_size_by_generation", opt$insect, opt$location, latitude, start_date, end_date, days.all, maxval, | 646 render_chart("adult_pop_size_by_generation", opt$insect, opt$location, latitude, start_date, end_date, days, maxval, |
650 opt$std_error_plot, P_adults, F1_adults, F2_adults, P_adults.std_error, F1_adults.std_error, F2_adults2.std_error) | 647 opt$std_error_plot, P_adults, F1_adults, F2_adults, P_adults.std_error, F1_adults.std_error, F2_adults2.std_error) |
651 | |
652 | 648 |
653 # Turn off device driver to flush output. | 649 # Turn off device driver to flush output. |
654 dev.off() | 650 dev.off() |