Learn R Programming

SlotLim (version 0.0.2)

catch_adjust: catch_adjust

Description

Calculates the targeted proportions under historical (old) and proposed (new) harvest slot limits using the same survivorship-by-length framework as prop_target. The ratio ("catch adjustment") is returned, and (optionally) a historical catch value is scaled by the adjustment. The optional plot overlays old/new in-slot proportions on the normalized survivorship curve with arrows indicating the direction of change (old → new).

Usage

catch_adjust(
  old_minLS = NULL,
  old_maxLS = NULL,
  old_Lc = NULL,
  new_minLS = NULL,
  new_maxLS = NULL,
  new_Lc = NULL,
  catch = NULL,
  M = NULL,
  growth_model = c("vb", "gompertz", "schnute"),
  Linf = NULL,
  K = NULL,
  l0 = 0,
  tmax = NULL,
  Gom_Linf = NULL,
  Gom_K = NULL,
  Gom_l0 = NULL,
  g1 = NULL,
  g2 = NULL,
  l2 = NULL,
  Lmin = NULL,
  plot = FALSE,
  length_units = NULL
)

Value

If plot = FALSE (default): a numeric scalar adjust_factor = prop_new/prop_old. If plot = TRUE: a list with

  • prop_old, prop_new — targeted proportions under old/new slots,

  • adjust_factorprop_new/prop_old,

  • adjusted_catch — only if catch provided,

  • plot — the ggplot2 object (or NULL if ggplot2 is unavailable).

Arguments

old_minLS, old_maxLS, old_Lc

Numeric. Historical slot limits and length at first capture.

new_minLS, new_maxLS, new_Lc

Numeric. New slot limits and length at first capture. If new_Lc is NULL, old_Lc is used.

catch

Optional numeric. Historical catch to be adjusted. If provided, adjusted_catch = catch * (prop_new/prop_old) is also computed.

M

Numeric or NULL. Natural mortality. If NULL, defaults to M = 4.899 * tmax^-0.916.

growth_model

One of "vb", "gompertz", "schnute".

Linf, K, l0

von Bertalanffy parameters; l0 is start length (default 0).

tmax

Numeric. The maximum observed age used to bound the integrals via l(tmax) and in the default mortality estimator M = 4.899 * tmax^-0.916.

Gom_Linf, Gom_K, Gom_l0

Gompertz parameters; requires 0 < Gom_l0 < Gom_Linf.

g1, g2, l2

Schnute parameters; l2 is length at tmax; requires g1>0, l2>0, and this parameterization assumes g2 != 0.

Lmin

Optional numeric. Lower bound for the curve grid. If NULL it uses the model’s start length (l0, Gom_l0, or 0).

plot

Logical. If TRUE, return a ggplot2 plot. Default FALSE (returns numeric catch adjustment only).

length_units

Optional character scalar. Units to show in the x-axis label when plot = TRUE (e.g., "mm" or "cm"). If NULL (default), the label is simply "Length".

Examples

Run this code
# numeric only
catch_adjust(old_minLS = 130, old_maxLS = 280, old_Lc = 80,
             new_minLS = 100, new_maxLS = 240,
             growth_model = "vb", Linf = 405, K = 0.118, l0 = 0, tmax = 34)

# \donttest{
# with plot (requires ggplot2)
catch_adjust(old_minLS = 130, old_maxLS = 280, old_Lc = 80,
             new_minLS = 100, new_maxLS = 240,
             growth_model = "vb", Linf = 405, K = 0.118, l0 = 0,
             tmax = 34, plot = TRUE, length_units = "mm")
# note that overlapping portions stray from color in legend due to alpha value
catch_adjust(old_minLS = 100, old_maxLS = 150, old_Lc = 80,
             new_minLS = 160, new_maxLS = 300,
             growth_model = "vb", Linf = 405, K = 0.118, l0 = 0,
             tmax = 34, plot = TRUE, length_units = "mm")
# }

Run the code above in your browser using DataLab