L_calc: L_calc

View source: R/L_calc.r

L_calcR Documentation

L_calc

Description

Compute landings in numbers or weight with Baranov equation. Set wgt_L = NULL to compute numbers instead of weight. Used in run_proj.

Usage

L_calc(F, Z, N, wgt_L = NULL)

Arguments

F

vector of fishing mortality rate, at age

Z

vector of total mortality rate at age including dead discards

N

vector of numbers of fish, at age, in population

wgt_L

vector of weight of fish, at age, in the landings. units of the result will be in units of wgt_L (e.g. metric tons, 1000 lb)

Author(s)

Kyle Shertzer and Nikolai Klibansky

Examples

## Not run: 
spp <- rdat_Tilefish
endyr <- paste(spp$parms$endyr)

# Compute landings in numbers for the terminal year
sum(L_calc(F = spp$F.age[endyr,], Z = spp$Z.age[endyr,], N = spp$N.age[endyr,]))
# The value should be very close to this:
sum(spp$CLD.est.mats$Ln.total[endyr,])
# Compute landings in weight for the terminal year
sum(L_calc(F = spp$F.age[endyr,], Z = spp$Z.age[endyr,], N = spp$N.age[endyr,], wgt_L = spp$a.series$gutwgt.wgted.L.klb))
# The value should be very close to this:
sum(spp$CLD.est.mats$Lw.total[endyr,])

## End(Not run)

nikolaifish/bamExtras documentation built on July 21, 2023, 8:26 a.m.