Skip to content

Commit

Permalink
Add default to 'target' in IcesMSY when missing
Browse files Browse the repository at this point in the history
  • Loading branch information
dorleta committed Jan 8, 2024
1 parent 2b6b6bc commit 7fb5b0b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions R/MP_3c_HCR_ICES_MSY.R
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,10 @@ IcesHCR <- function(stocks, advice, advice.ctrl, year, stknm,...){

ref.pts <- advice.ctrl[[stknm]]$ref.pts # matrix[3,it] rows = Blim, Btrigger, Fmsy
Cadv <- ifelse(advice.ctrl[[stknm]][['AdvCatch']][year+1] == TRUE, 'catch', 'landings')
target <- advice.ctrl[[stknm]]$target # Target when the biomass is above MSY BTrigger, it can be Fupp or Fmsy, or other target in the reference points


# Target when the biomass is above MSY BTrigger, it can be Fupp or Fmsy, or other target in the reference points
# If the argument is missing the default is Fmsy
target <- ifelse(is.null(advice.ctrl[[stknm]]$target), 'Fmsy', advice.ctrl[[stknm]]$target)

iter <- dim(stk@m)[6]
yrsnames <- dimnames(stk@m)[[2]]
Expand Down

0 comments on commit 7fb5b0b

Please sign in to comment.