Skip to content

Commit

Permalink
Added proportionsv at age in @catch.n top FLIndexBiomass returned by …
Browse files Browse the repository at this point in the history
…survey()
  • Loading branch information
iagomosqueira committed Jan 20, 2025
1 parent d538e02 commit 9cfe884
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: FLCore
Title: Core Package of FLR, Fisheries Modelling in R
Version: 2.6.20.9321
Version: 2.6.20.9322
Authors@R: c(
person("Iago", "Mosqueira", email = "iago.mosqueira@wur.nl",
role = "cre", comment=c(c(ORCID = "0000-0002-3252-0591"))),
Expand Down
5 changes: 5 additions & 0 deletions R/oem.R
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ setMethod("survey", signature(object="FLStock", index="FLIndex"),
#' ple4.biom <- as(ple4.index, "FLIndexBiomass")
#' survey(ple4, ple4.biom)

# TODO: ADD catch.n

setMethod("survey", signature(object="FLStock", index="FLIndexBiomass"),
function(object, index, sel=sel.pattern(index),
ages=ac(seq(range(index, c('min')), range(index, c('max')))),
Expand All @@ -69,6 +71,9 @@ setMethod("survey", signature(object="FLStock", index="FLIndexBiomass"),
# COMPUTE index
abnd <- index(object, sel=sel, ages=ages, timing=timing)

# ADD propatage
catch.n(index) <- abnd

# APPLY Q on biomass
index(index) <- c(index.q * unitSums(quantSums(abnd *
catch.wt[ages, dimnames(index)$year])) ^ stability)
Expand Down

0 comments on commit 9cfe884

Please sign in to comment.