Learn R Programming

LeMaRns

LeMaRns is an R package to set up, run and explore the outputs of the Length-based Multi-species model LeMans, focused on the marine environment.

Installation

You can install the released version of LeMaRns from CRAN with:

install.packages("LeMaRns")

Example

This is a basic example of how to set up, run and plot the resulting spawning-stock biomass:

library(LeMaRns)
NS_params <- LeMansParam(NS_par, tau=NS_tau, eta=eta, L50=L50,other=1e12)
#> Warning in .local(df, gdf, ...): The following columns of df do not match any of the species arguments and were therefore added to recruit_params:
#> a, b
effort <- matrix(0.25, 50, dim(NS_params @Qs)[3])
model_run <- run_LeMans(NS_params, years=50, effort=effort)
plot_SSB(NS_params,model_run)

Copy Link

Version

Install

install.packages('LeMaRns')

Monthly Downloads

127

Version

0.1.2

License

GPL-3

Maintainer

Michael A. Spence

Last Published

December 9th, 2019

Functions in LeMaRns (0.1.2)

NS_other

Other food for the North Sea
NS_par

North Sea data
calc_phi

Calculate the proportion of individuals that leave each length class for each species each length class each time step.
NS_eta

The steepness of the slope of the catchability curve
NS_mixed_fish

Gear selectivity data frame
calc_prefs

Calculate predator-prey size preferences
calc_Q

Calculate gear catchability
calc_SSB

Calculate Spawning Stock Biomass (SSB) or total biomass
plot_SSB

Plot Spawning Stock Biomass (SSB)
plot_indicators

Plot indicators
calc_suit_vect

Combines prey preference and prey suitability
LeMans_param-class

An S4 class representing the inputs of the LeMans model
NS_L50

The length at 50% of the maximum catchability of the catchability curve
NS_tau

North Sea interaction matrix
calc_LFI

Calculate community indicators
LeMans_outputs-class

An S4 class representing the outputs of the LeMans model
LeMansParam

A constructor for the LeMansParam class
comb_LeMans_run

Combine two LeMans_outputs objects
calc_growth

Calculate growth
calc_mature

Calculate the proportion of mature individuals
calc_M1

Calculate background mortality
calc_M2

Calculate predation mortality
get_SSB

Calculate Spawning Stock Biomass (SSB) or total biomass
get_N0

Generate a starting value for N
get_rec_fun

Collate the stock recruitment functions
make_rec_fun

Generate the stock recruitment functions
rec_const

The constant stock recruitment function
calc_ration_growthfac

Calculate growth increments
rec_hockey

The hockey-stick stock recruitment function
get_annual_catch

Get annual catch for each species, catch per unit effort or catch per gear
calc_recruits

Calculate the number of recruits
get_indicators

Calculate indicators
rec_linear

The density-independent stock recruitment function
run_LeMans

Project the LeMans model
rec_Ricker

The Ricker stock recruitment function
rec_BH

The Beverton-Holt stock recruitment function