Package: aLBI
Type: Package
Title: Estimating Length-Based Indicators for Fish Stock
Version: 0.1.9
Authors@R: c(
    person("Ataher", "Ali", email = "ataher.cu.ms@gmail.com", role = c("aut", "cre")),
    person("Mohammed Shahidul", "Alam", email = "alamms@cu.ac.bd", role = "aut"))
Maintainer: Ataher Ali <ataher.cu.ms@gmail.com>
Description: Provides tools for estimating length-based indicators from length frequency data to assess fish stock status and manage fisheries sustainably. Implements methods from Cope and Punt (2009) <doi:10.1577/C08-025.1> for data-limited stock assessment and Froese (2004) <doi:10.1111/j.1467-2979.2004.00144.x> for detecting overfishing using simple indicators. Key functions include:
    FrequencyTable(): Calculate the frequency table from the collected and also the extract the length frequency data from the frequency table with the upper length_range. A numeric value specifying the bin width for class intervals. If not provided, the bin width is automatically calculated using Wang (2020) <doi:10.1016/j.fishres.2019.105474> formula.
    FreqTM(): Creates a frequency distribution table for fish length data across multiple months using a consistent length class structure. The bin width is determined by either a custom value or Wang's formula, applied uniformly across all months. The function dynamically detects and renames columns to 'Month' and 'Length' from the input dataframe. The maximum observed length is included as part of the last class, with the upper bound set to the smallest multiple of the bin width greater than or equal to the maximum length. Months can be converted to dates using a configurable day and year, with dates assigned sequentially in 'day.month.year' format (e.g., 15.01.26).
    FishPar(): Calculates length-based indicators (LBIs) proposed by Froese (2004) <doi:10.1111/j.1467-2979.2004.00144.x> such as the percentage of mature fish (Pmat), percentage of optimal length fish (Popt), percentage of mega spawners (Pmega), and the sum of these as Pobj. This function also estimates confidence intervals for different lengths, visualizes length frequency distributions, and provides data frames containing calculated values.
    FishSS(): Makes decisions based on input from Cope and Punt (2009) <doi:10.1577/C08-025.1> and parameters calculated by FishPar() (e.g., Pobj, Pmat, Popt, LM_ratio) to determine stock status as target spawning biomass (TSB40) and limit spawning biomass (LSB25), and selectivity.
    LWR(): Fits and visualizes length-weight relationships using linear regression, with options for log-transformation and customizable plotting.
Depends: R (>= 4.0.0)
Imports: dplyr, openxlsx, stats, graphics, grDevices, ggplot2, utils
Suggests: testthat, knitr, rmarkdown, devtools, rlang, readxl
License: GPL-3
Encoding: UTF-8
LazyData: true
URL: https://github.com/Ataher76/aLBI
BugReports: https://github.com/Ataher76/aLBI/issues
RoxygenNote: 7.3.2
VignetteBuilder: knitr
NeedsCompilation: no
Packaged: 2026-01-01 13:08:43 UTC; User
Author: Ataher Ali [aut, cre],
  Mohammed Shahidul Alam [aut]
Repository: CRAN
Date/Publication: 2026-01-11 00:30:02 UTC
Built: R 4.6.0; ; 2026-04-28 22:58:12 UTC; unix
