make_bdat_focal: Get Observed trips for discard year This function utilizes...

View source: R/make_bdat_focal.R

make_bdat_focalR Documentation

Get Observed trips for discard year This function utilizes the DISCARD field in CAMS_OBS_CATCH. This value must be used for d/k calculations since it represents the observed part of a trip.

Description

Get Observed trips for discard year This function utilizes the DISCARD field in CAMS_OBS_CATCH. This value must be used for d/k calculations since it represents the observed part of a trip.

Usage

make_bdat_focal(
  bdat,
  species_itis = "164712",
  stratvars = c("GEARTYPE", "meshgroup", "region", "halfofyear")
)

Arguments

bdat

table of observed trips that can include (and should include) multiple years

species_itis

species of interest using SPECIES ITIS code

stratvars

Stratification variables. These must be columns available in 'bdat'. Not case sensitive.

year

Year where discard estimate is needed

Value

a tibble with LINK1, CAMS_SUBTRIP, STRATA, KALL, BYCATCH. Kept all (KALL) is rolled up by CAMS_SUBTRIP (subtrip). BYCATCH is the observed discard of the species of interest.

This table is used in 'discaRd'

the source table (bdat) is created outside of this function in SQL. It can be quite large so it is not done functionally here. See vignette (when it's available..)


noaa-garfo/discaRd documentation built on April 17, 2025, 10:32 p.m.