adfg.calcTotalCatchZCs: Calculate expanded annual total catch size compositions by...

View source: R/adfg.calcTotalCatchZCs.R

adfg.calcTotalCatchZCsR Documentation

Calculate expanded annual total catch size compositions by crab fishery, area, year, sex and shell condition

Description

Function to calculate expanded annual total catch size compositions by crab fishery, area, year, sex and shell condition.

Usage

adfg.calcTotalCatchZCs(
  tblTotAB,
  tblTotZCsRaw,
  cutpts = seq(from = 5, to = 185, by = 5),
  truncate.low = TRUE,
  truncate.high = FALSE
)

Arguments

tblTotAB

: dataframe with total catch abundance and biomass by fishery, area, year, sex, and shell condition

tblTotZCsRaw

: data.frame from call to function adfgRead_MPD()

cutpts

: cutpts for bins

truncate.low

: flag to exclude crab with sizes less than minimum cutpt (default=TRUE)

truncate.high

: flag to exclude crab with sizes greater than maximum cutpt (default=FALSE)

Details

Uses sqldf::sqldf() and reshape2::dcast(). tblTotZCsRaw should have columns "fishery", "area", "year", "sex", "maturity", "shell condition", "size" and "count".

Value

a dataframe with columns

  • fishery

  • area

  • sex

  • shell condition

  • year

  • size

  • abundance (in thousands of crab)


wStockhausen/tcsamFisheryDataADFG documentation built on April 18, 2023, 12:56 p.m.