# 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=1,csv.output=FALSE)
e2e_plot_trophic(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=6,height=8)
e2e_plot_trophic(model, results=results)
dev.off()
# Alternatively, plot the same data from a csv file saved in a temporary
# folder by the e2e_run() function:
model <- e2e_read("North_Sea", "1970-1999")
results <- e2e_run(model, nyears=1, csv.output=TRUE)
e2e_plot_trophic(model, use.saved=TRUE)
# For the same model, plot the example data with credible intervals:
# This example requires the Strathe2E2examples supplementary data package.
if(require(StrathE2E2examples)){
e2e_plot_trophic(model, ci.data=TRUE, use.example=TRUE)
}
# }
Run the code above in your browser using DataLab