From 005d9c58df8295eea61a5e7a35c8bb3c00a236c4 Mon Sep 17 00:00:00 2001 From: Sarah Gaichas Date: Sat, 7 Oct 2023 17:27:43 -0400 Subject: [PATCH] appends biomass pools if they exist for surveys --- R/om_index.R | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/R/om_index.R b/R/om_index.R index 167ca6a..d99cb08 100644 --- a/R/om_index.R +++ b/R/om_index.R @@ -49,9 +49,16 @@ om_index <- function(usersurvey = usersurvey_file, { source(s, local = TRUE) + # add in biomass pools if they exist + if("truebiopool_ss" %in% names(omlist_ss)){ + truebio_ss <- rbind(omlist_ss$truebio_ss, omlist_ss$truebiopool_ss) + }else{ + truebio_ss <- omlist_ss$truebio_ss + } + #biomass based fishery independent survey index # this uses result$biomass_ages to sample biomass directly, no need for wt@age est - survey_B <- atlantisom::create_survey(dat = omlist_ss$truebio_ss, + survey_B <- atlantisom::create_survey(dat = truebio_ss, time = survtime, species = survspp, boxes = survboxes,