# NOT RUN {
# Load the 1970-1999 version of the North Sea model supplied with the package,
# run, and generate a plot:
model <- e2e_read("North_Sea", "1970-1999")
results <- e2e_run(model, nyears=2)
e2e_plot_biomass(model, results=results)
# Direct the graphics output to a pdf file ...
# or jpeg("plot.jpg"), png("plot.png")
pdf(file.path(tempdir(), "plot.pdf"),width=4,height=6)
e2e_plot_biomass(model, results=results)
dev.off()
# }
# NOT RUN {
# Alternatively, plot the same data from a csv file saved by the e2e_run() function. Here the
# csv output is directed to a temporary folder since results.path is not set in the e2e_read()
# function call:
results <- e2e_run(model, nyears=2,csv.output=TRUE)
dev.new()
e2e_plot_biomass(model, use.saved=TRUE)
# }
# NOT RUN {
# For the same model, plot the example data with credible intervals:
# This example requires the Strathe2E2examples supplementary data package.
if(require(StrathE2E2examples)){
e2e_plot_biomass(model, ci.data=TRUE, use.example=TRUE)
}
# }
Run the code above in your browser using DataLab