# HG changeset patch # User greg # Date 1481901360 18000 # Node ID 7c40c2b303f1ecc615165a37256a31af7e06baf3 # Parent 7c43bc0ce69c4943ad38935dfaa1c0ff81890b07 Uploaded diff -r 7c43bc0ce69c -r 7c40c2b303f1 bmsb.R --- a/bmsb.R Fri Dec 16 08:51:06 2016 -0500 +++ b/bmsb.R Fri Dec 16 10:16:00 2016 -0500 @@ -4,12 +4,12 @@ option_list <- list( make_option(c("-a", "--adult_mort"), action="store", dest="adult_mort", type="integer", help="Adjustment rate for adult mortality"), - make_option(c("-b", "--adult_nymph_accum"), action="store", dest="adult_nymph_accum", type="integer", help="Adjustment of DD accumulation (old nymph->adult)"), + make_option(c("-b", "--adult_accum"), action="store", dest="adult_accum", type="integer", help="Adjustment of DD accumulation (old nymph->adult)"), make_option(c("-c", "--egg_mort"), action="store", dest="egg_mort", type="integer", help="Adjustment rate for egg mortality"), make_option(c("-d", "--latitude"), action="store", dest="latitude", type="double", help="Latitude of selected location"), make_option(c("-e", "--location"), action="store", dest="location", help="Selected location"), make_option(c("-f", "--min_clutch_size"), action="store", dest="min_clutch_size", type="integer", help="Adjustment of minimum clutch size"), - make_option(c("-g", "--max_clutch_size"), action="store", dest="max_clutch_size", type="integer", help="Adjustment of maximum clutch size"), + make_option(c("-i", "--max_clutch_size"), action="store", dest="max_clutch_size", type="integer", help="Adjustment of maximum clutch size"), make_option(c("-j", "--nymph_mort"), action="store", dest="nymph_mort", type="integer", help="Adjustment rate for nymph mortality"), make_option(c("-k", "--old_nymph_accum"), action="store", dest="old_nymph_accum", type="integer", help="Adjustment of DD accumulation (young nymph->old nymph)"), make_option(c("-o", "--output"), action="store", dest="output", help="Output dataset"), @@ -207,6 +207,18 @@ return } +cat("Replications: ", opt$replications, "\n") +cat("Photoperiod: ", opt$photoperiod, "\n") +cat("Oviposition rate: ", opt$oviposition, "\n") +cat("Egg mortality rate: ", opt$egg_mort, "\n") +cat("Nymph mortality rate: ", opt$nymph_mort, "\n") +cat("Adult mortality rate: ", opt$adult_mort, "\n") +cat("Min clutch size: ", opt$min_clutch_size, "\n") +cat("Max clutch size: ", opt$max_clutch_size, "\n") +cat("(egg->young nymph): ", opt$young_nymph_accum, "\n") +cat("(young nymph->old nymph): ", opt$old_nymph_accum, "\n") +cat("(old nymph->adult): ", opt$adult_accum, "\n") + # Read in the input temperature datafile temperature_file_path <- data.input(opt$location, opt$year, opt$temperature_dataset) @@ -619,7 +631,7 @@ # SE for nymphs sn.se <- apply((S1.rep + S2.rep) / sqrt(opt$replications), 1, sd) # SE for eggs -se.se <- apply(S0.rep ,1 ,sd) / sqrt(opt$replications) +se.se <- apply(S0.rep, 1, sd) / sqrt(opt$replications) # SE value for P g0.se <- apply(g0.rep, 1, sd) / sqrt(opt$replications) # SE for F1 @@ -633,7 +645,7 @@ # SE for F2 adult g2a.se <- apply(g2a.rep, 1, sd) / sqrt(opt$replications) -dev.new(width = 9, height = 9) +dev.new(width=20, height=20) # Start PDF device driver to save charts to output. pdf(file=opt$output, height=20, width=20, bg="white")