Mercurial > repos > greg > insect_phenology_model
changeset 106:aa1890120743 draft
Uploaded
author | greg |
---|---|
date | Tue, 05 Dec 2017 11:21:30 -0500 |
parents | 375a2b8e7207 |
children | 2c2903e7ce68 |
files | insect_phenology_model.R |
diffstat | 1 files changed, 6 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/insect_phenology_model.R Tue Dec 05 11:21:23 2017 -0500 +++ b/insect_phenology_model.R Tue Dec 05 11:21:30 2017 -0500 @@ -202,14 +202,14 @@ } else if (chart_type == "pop_size_by_generation") { title <- paste(insect, ": Total pop. by generation :", location, ": Lat:", latitude, ":", start_date, "-", end_date, sep=" ") legend_text <- c("P", "F1", "F2") - columns <- col=c(1, 2, 4) + columns <- c(1, 2, 4) } else if (chart_type == "adult_pop_size_by_generation") { title <- paste(insect, ": Adult pop. by generation :", location, ": Lat:", latitude, ":", start_date, "-", end_date, sep=" ") legend_text <- c("P", "F1", "F2") - columns <- col=c(1, 2, 4) + columns <- c(1, 2, 4) } plot(days, group1, main=title, type="l", ylim=c(0, maxval), axes=F, lwd=2, xlab="", ylab="", cex=3, cex.lab=3, cex.axis=3, cex.main=3) - legend("topleft", legend_text, lty=c(1, 1, 1), columns, cex=3) + legend("topleft", legend_text, lty=c(1, 1, 1), col=columns, cex=3) lines(days, group2, lwd=2, lty=1, col=2) lines(days, group3, lwd=2, lty=1, col=4) axis(1, at=c(1:12) * 30 - 15, cex.axis=3, labels=c("Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec")) @@ -232,8 +232,6 @@ # so get the value from the first row. latitude <- temperature_data_frame$LATITUDE[1] -cat("Number of days: ", opt$num_days, "\n") - # Initialize matrices. Eggs.replications <- matrix(rep(0, opt$num_days*opt$replications), ncol=opt$replications) YoungNymphs.replications <- matrix(rep(0, opt$num_days*opt$replications), ncol=opt$replications) @@ -621,6 +619,9 @@ # Standard error for F2 adult. F2_adults.std_error <- apply(F2_adults.replications, 1, sd) / sqrt(opt$replications) +# Display the total number of days in the Galaxy history item blurb. +cat("Number of days: ", opt$num_days, "\n") + dev.new(width=20, height=40) # Start PDF device driver to save charts to output.