View source: R/18_multiplot_proj.R
multiplot_proj | R Documentation |
plots outputs from several projections that result from projections()
, with multiple depletion levels.
multiplot_proj( high.d1, med.d1, low.d1, high.d2, med.d2, low.d2, high.d3, med.d3, low.d3, spaghetti = FALSE, years.to.plot = 50, color.palette = c("forestgreen", "darkorange", "red"), lang = "en" )
high.d1 |
a list containing output from |
med.d1 |
a list containing the middle bycatch value and lowest starting depletion |
low.d1 |
a list containing the lowest bycatch value and lowest starting depletion |
high.d2 |
a list containing the highest bycatch value and middle starting depletion |
med.d2 |
a list containing the middle bycatch value and middle starting depletion |
low.d2 |
a list containing the lowest bycatch value and middle starting depletion |
high.d3 |
a list containing the highest bycatch value and highest starting depletion |
med.d3 |
a list containing the middle bycatch value and highest starting depletion |
low.d3 |
a list containing the lowest bycatch value and highest starting depletion |
spaghetti |
either FALSE or a number, where the number is how many simulations to show from the same scenario |
years.to.plot |
How many years to plot on the x axis |
color.palette |
A vector of length 3 giving the color values for low, medium, and high bycatch mortality or bycatch mortality rate |
lang |
language to use. "en" = English; "es" = Spanish; "fr" = French. |
A plot of 50 percent and 90 percent confidence intervals of population projections if spaghetti == FALSE
or a spaghetti plot with n individual projections if spaghetti == n
, from projections()
.
parms <- list( S0 = 0.944, S1plus = 0.99, K1plus = 9000, AgeMat = 18, nages = 20, z = 2.39, lambdaMax = 1.02 ) InitDepl.vec <- c(0.1, 0.5, 0.9) BycatchCV <- 0.2 nyears <- 100 high.list <- lapply( X = InitDepl.vec, function(x) { projections( NOut = 50, ConstantRateBycatch = list(Rate = 0.3, CV = BycatchCV), InitDepl = x, lh.params = parms, nyears = nyears, obs_CV = 0.2 ) } ) med.list <- lapply( X = InitDepl.vec, function(x) { projections( NOut = 50, ConstantRateBycatch = list(Rate = 0.02, CV = BycatchCV), InitDepl = x, lh.params = parms, nyears = nyears, obs_CV = 0.2 ) } ) low.list <- lapply( X = InitDepl.vec, function(x) { projections( NOut = 50, ConstantRateBycatch = list(Rate = 0.001, CV = BycatchCV), InitDepl = x, lh.params = parms, nyears = nyears, obs_CV = 0.2 ) } ) multiplot_proj( high.d1 = high.list[[1]], # d1 is the lowest depletion med.d1 = med.list[[1]], low.d1 = low.list[[1]], high.d2 = high.list[[2]], med.d2 = med.list[[2]], low.d2 = low.list[[2]], high.d3 = high.list[[3]], med.d3 = med.list[[3]], low.d3 = low.list[[3]], years.to.plot = nyears )
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.