agelenprob: agelenprob

View source: R/agelenprob.r

agelenprobR Documentation

agelenprob

Description

Build age-length probability matrix associated with a set of length comps

Usage

agelenprob(
  age,
  len,
  binmid_lenc,
  cv_lenc,
  plot = FALSE,
  label = TRUE,
  label_min = 0.01
)

Arguments

age

vector of ages

len

vector of lengths corresponding to age

binmid_lenc

vector of lengths corresponding to midpoints of length composition bins. These do not need to match len.

cv_lenc

cv associated with variation in length at age associated with lenc

plot

logical. If TRUE, plot an image of the resulting probability matrix

label

logical. If TRUE, add probabilities as text to image plot

label_min

numeric. Set minimum probability to label in plot

Author(s)

Kyle Shertzer and Nikolai Klibansky

Examples

## Not run: 
rdat <- rdat_RedSnapper
agelenprob(
  age=rdat$a.series$age,
  len=rdat$a.series$length,
  binmid_lenc=as.numeric(colnames(rdat$comp.mats$lcomp.cHL.ob)),
  cv_lenc=rdat$parm.cons$len.cv.val.L[8],
  plot=TRUE)

## End(Not run)

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