Closed zoyafuso-NOAA closed 10 months ago
Using version 2.1.1
This piece of script does not reproduce what is in HAEHNR.BIOMASS_EBS_PLUSNW. Bug has to do with how NAs are dealt in the function.
library(gapindex) ## Connect to Oracle sql_channel <- gapindex::get_connected() ## Pull data. gapindex_data <- gapindex::get_data( year_set = c(1993), survey_set = "EBS", spp_codes = 81742, haul_type = 3, abundance_haul = "Y", pull_lengths = F, sql_channel = sql_channel) ## Fill in zeros and calculate CPUE cpue <- gapindex::calc_cpue(racebase_tables = gapindex_data) ## Calculate stratum-level biomass, population abundance, mean CPUE and ## associated variances biomass_stratum <- gapindex::calc_biomass_stratum( racebase_tables = gapindex_data, cpue = cpue) ## Calculate aggregated biomass and population abundance across subareas, ## management areas, and regions biomass_subareas <- gapindex::calc_biomass_subarea( racebase_tables = gapindex_data, biomass_strata = biomass_stratum)
will be updated in v2.1.2
Using version 2.1.1
This piece of script does not reproduce what is in HAEHNR.BIOMASS_EBS_PLUSNW. Bug has to do with how NAs are dealt in the function.