From 543cd1f57e0c6df2a3e043f9e22cbb7e7899d964 Mon Sep 17 00:00:00 2001 From: MirenAltuna Date: Fri, 12 Jul 2024 22:23:06 +0200 Subject: [PATCH] Correction in density dependence wight function to coincide with the dd_mod nomenclature --- R/OM_1a2_DensityDependent_weight_functions.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/OM_1a2_DensityDependent_weight_functions.R b/R/OM_1a2_DensityDependent_weight_functions.R index 73ed046..9481c33 100644 --- a/R/OM_1a2_DensityDependent_weight_functions.R +++ b/R/OM_1a2_DensityDependent_weight_functions.R @@ -97,7 +97,7 @@ ddwAgeLFD <- function(biol, stknm, year, season, ctrl, covars, ...) { B <- quantSums((biol@wt*biol@n)[,year-1,,season,])[drop=T] - condb <- predict(dd_mod, data.frame(biomass = B)) # Predict the "b" parameter of the length-weight relationship. + condb <- predict(dd_mod, data.frame(B = B)) # Predict the "b" parameter of the length-weight relationship. mx.condb <- matrix(condb, dim(biol@n)[1], dim(biol@n)[6], byrow = TRUE) wage <- a * mx.lfd^mx.condb/1000 # in tonnes