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.
rochet_GB_modelSetuprochet_GB_parameterValuesrochet_GB_initialValuesrochet_GB_foodwebrochet_GB_speciesThe 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.
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
Several functions are invoked when running the model. These functions can be changed by the user to suit their needs.
calc_M1calc_M2_ccalc_maturitycalc_phicalc_population_growthcalc_rationcalc_recruitscalc_sizePref_suitabilitycalc_FHelp is available for all functions or feel free to write your own to replace any of these.
Visualization of output is critical. A basic plotting tool is provided to view output. The user is encouraged to write their own plotting routines.
plot_key_run(results$catch/1E6, ylabel = "Catch (millions individuals)", speciesNames=rochet_GB_species, scales="free")
plot_key_run(results$N/1E6, ylabel = "Abundance (millions individuals)", is.aggregated=T, speciesNames=rochet_GB_species, scales="free")
plot_key_run(results$M2, ylabel = "Predation mortality", speciesNames=rochet_GB_species, scales="fixed")
plot_key_run(results$suitability, ylabel = "Suitability", speciesNames = rochet_GB_species, scales="free",speciesSuitability = "Forage fish",predOrPrey = "prey")
Hall et al. (2006). A length-based multispecies model for evaluating community responses to fishing. Can. J. Fish. Aquat. Sci. 63:1344-1359.
Rochet et al. (2011). Does selective fishing conserve community biodiversity? Prediction from a length-based multispecies model. Can. J. Fish. Aquat. Sci. 68:469-486
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.