From f1db2268b70929c91883493cec12729bb235b138 Mon Sep 17 00:00:00 2001 From: Iago Mosqueira Date: Mon, 3 Feb 2025 14:39:03 +0100 Subject: [PATCH] Rteurn fbar even if empty --- DESCRIPTION | 2 +- R/FLStock.R | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index cb18f48b..733d81f1 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: FLCore Title: Core Package of FLR, Fisheries Modelling in R -Version: 2.6.20.9323 +Version: 2.6.20.9324 Authors@R: c( person("Iago", "Mosqueira", email = "iago.mosqueira@wur.nl", role = "cre", comment=c(c(ORCID = "0000-0002-3252-0591"))), diff --git a/R/FLStock.R b/R/FLStock.R index 04b07fa1..110339dd 100644 --- a/R/FLStock.R +++ b/R/FLStock.R @@ -506,7 +506,8 @@ setMethod("fbar", signature(object="FLStock"), if(units(harvest(object)) == 'f' || units(harvest(object)) == 'hr') { return(quantMeans(harvest(object)[as.character(seq(min, max)),])) } else { - stop("Correct units (f or hr) not specified in the harvest slot") + return(quantMeans(harvest(object)[as.character(seq(min, max)),])) +# stop("Correct units (f or hr) not specified in the harvest slot") } } ) # }}}