plot_key_run: Plots output from the key_run script

Description Usage Arguments Notes

View source: R/plot_key_run.R

Description

Plots catch, N, M1, M2, SSB, recruits, suitability, growth efficiency, ration, maturity, and growth output from the model run. See key_run for details regarding obtaining output. This is a rudimentary tool used for troubleshooting the model. The user is expected to develop their own set of plotting tools for publication purposes

Usage

1
2
3
plot_key_run(dataSet, ylabel = "change this label", is.aggregated = F,
  speciesNames, scales = "fixed", speciesSuitability = 1,
  predOrPrey = "Prey")

Arguments

dataSet

The data set to be plotted. See key_run

ylabel

The yaxis label for the figure. Match this with the data.

is.aggregated

A logical value. Determines if aggregation is required over sizeClass. Only valid for N, M2 and catch.

speciesNames

A data frame in the format of rochet_GB_species

scales

Text indicating whether to display yaxis range fixed for all species ("fixed") or not ("free").

speciesSuitability

Either species number or species name. Only required if passing suitability or size preference data. Default = 1.

predOrPrey

character string indicating whether to plot suitabiliy for species as the prey or predator. Values "prey" or "pred". Default = "Prey"

Notes

Not all arguments are required for plotting. speciesSuitability and predOrPrey are only required for plotting suitabilities (and size preferences). If you are plotting any other output data then you can ignore these arguments. In some cases is.aggregated is irrelevant. A warning will let you know that this is so.

The suitability plots (similar for size preference plots) are interpreted in the following way: If predOrPrey = "prey" and speciesSuitability = "Atlantic cod" then each facet represents a predator of cod. Each line drawn represents a size class of the predator and displays its suitability for each size class (x axis) of Cod (prey)

The units of the output variable are explained in key_run.

'@examples ## Not run: # runs the model with bundled data from Rochet et al (2011). output <- key_run(Ffull=.4,nYrs=50,rochet_GB_modelSetup,rochet_GB_parameterValues,rochet_GB_initialValues,rochet_GB_foodweb,rochet_GB_species) # plots suitability of cod as a prey species to all other species in the model. plot_key_run(output$suitability,ylabel="Suitability",speciesNames=rochet_GB_species,scales="free",speciesSuitability = "atLANTIC coD",predOrPrey="prey") # plots catch (in millions of individuals) aggregated over size class for each species in the model. plot_key_run(output$catch/1E6,ylabel="Catch (millions of individuals)",is.aggregated = T,speciesNames=rochet_GB_species,scales="free") ## End(Not run)


NOAA-EDAB/LeMANS documentation built on Feb. 7, 2021, 11:01 p.m.