chartlbi is a project built around the utilities for the Length Based Indicator (LBI) algorithm developed by ICES and provides an alternative visualisation of the LBI indicators to the old traffic light system. As a consequence most of the obsolete libraries the original source code was relying on such ReportRs have now vanished. In addition, neither JAVA nor Java dependencies such ReporteRsjars are any longer required, therefore easing its installation.
The primary goal of this wrapper is to make the LBI visual outputs more modern-like, visually-appealing and
hopefully more intuitive, facilitating its integration with other similar length-based methods applied as part of everyone's
data analysis. Each indicator is now plotted by using ggplot2
and stacked up one on top of another, where
every individual indicator value per timestep is visually compared against their theoretical thresholds. Any value equal
or above the threshold will be plotted in green and below in red.
chartlbi has cut from the source code the capacity of showing the Optimal Yield indicator as a function of Lmaxy
,
that is, the length class from the length-frequency matrix that holds the largest biomass per timestep. The reason being
is that there are two bugs in the original source code as follows:
- The old algorithm does not contemplate that two length-classes may hold the same biomass. Such case is possible
when the mean weight for a single year and length class is calculated as the average weight of all individuals within,
rather than using the formula
$W = a*L^b$ .(See bug source code). - Even when there is only one single length-class per maximum biomass and timestep, the calculation of `Lmaxy` is performed by multiplying the columns of the length-frequency and weight-at-length in desynchronised mode. There is a mismatch for every pair of columns. (See bug source code)
This R package can be installed through the devtools as follows:
devtools::install_github("https://github.com/d2gex/chartlbi", dep=TRUE)