# Minimal, fast example (no plotting), passing lower/upper directly:
slotlim_once(
Cy = 1000,
b_index = c(0.5, 0.6, 0.7, 0.6, 0.5), method = "2over3",
minLS = 120, maxLS = 240, Lc = 80,
growth_model = "vb", Linf = 405, K = 0.118, l0 = 0,
tmax = 34,
lower = 100, upper = 220
)
# \donttest{
# Derive lower/upper from length-frequency percentiles:
set.seed(1)
LF <- rnorm(200, mean = 180, sd = 40) # toy example LF
# Compute M from tmax:
slotlim_once(
Cy = 1000,
b_index = c(0.5, 0.6, 0.7, 0.6, 0.5),
minLS = 120, maxLS = 240, Lc = 80,
growth_model = "vb", Linf = 405, K = 0.118, l0 = 0,
tmax = 34,
LF = LF, probs = c(0.05, 0.95),
method = "1over2" # rb method chosen
)
# Use explicit M (still provide tmax for bounds):
slotlim_once(
Cy = 1000,
b_index = c(0.5, 0.6, 0.7, 0.6, 0.5),
minLS = 120, maxLS = 240, Lc = 80,
growth_model = "vb", Linf = 405, K = 0.118, l0 = 0,
tmax = 34,
M = 0.19,
LF = LF, probs = c(0.025, 0.975),
method = "1over2" # rb method chosen
)
# Plotting example (needs ggplot2 and patchwork):
slotlim_once(
Cy = 1000,
b_index = c(0.5, 0.6, 0.7, 0.6, 0.5),
minLS = 120, maxLS = 240, Lc = 80,
growth_model = "vb", Linf = 405, K = 0.118, l0 = 0,
tmax = 34,
LF = LF, probs = c(0.025, 0.975),
method = "1over2", # rb method chosen
plots = TRUE, length_units = "mm"
)
# }
Run the code above in your browser using DataLab