knitr::opts_chunk$set(collapse = TRUE,   comment = "#>" ,fig.width = 8, fig.height = 8,fig.align="center")
library(LeMANS)

The LeMANS package is an implementation of the LeMANS model as described in the Hall et al (2006) and Rochet et al (2011) publications. The data provided (bundled with the package - lazily loaded) reflects the Georges Bank (USA) data described in the Rochet et al. paper.

The contents of these can be viewed simply by typing in the names in the console. To view the description of a data object use help. For example ?rochet_GB_parameterValues.

Usage

To run the model right out of the box:

    results <- key_run(Ffull=0.4, nYrs=50, rochet_GB_modelSetup, rochet_GB_parameterValues, rochet_GB_initialValues, rochet_GB_foodweb, rochet_GB_species)

results is a list of several output variables (catch, recruits, M1, M2, F, spawning stock biomass, N, and more).

    str(results)

Plotting routines help visualize these output variables

Type ?key_run for more help

Intermediate functions

Several functions are invoked when running the model. These functions can be changed by the user to suit their needs.

Help is available for all functions or feel free to write your own to replace any of these.

Plotting {#plotting}

Visualization of output is critical. A basic plotting tool is provided to view output. The user is encouraged to write their own plotting routines.

To produce a plot of catch by species for each size class with all of the species yaxes scaled to their output:

    plot_key_run(results$catch/1E6, ylabel = "Catch (millions individuals)", speciesNames=rochet_GB_species, scales="free")

To produce a plot of total abundance aggregated over each size class with species yaxes fixed across all species:

    plot_key_run(results$N/1E6, ylabel = "Abundance (millions individuals)", is.aggregated=T, speciesNames=rochet_GB_species, scales="free")

To produce a plot of M2 predation for each size class with species yaxes fixed across all species:

    plot_key_run(results$M2, ylabel = "Predation mortality", speciesNames=rochet_GB_species, scales="fixed")

To produce a plot of the suitability forage fish to other species in the model:

    plot_key_run(results$suitability, ylabel = "Suitability", speciesNames = rochet_GB_species, scales="free",speciesSuitability = "Forage fish",predOrPrey = "prey")

Publications {#pubs}



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