convert_length_to_age_samples: Convert length-composition to age-composition data

View source: R/Convert_length_to_age_samples.R

convert_length_to_age_samplesR Documentation

Convert length-composition to age-composition data

Description

convert_length_to_age_samples converts a matrix of length-composition data to age-composition data for use in CCSRA

Usage

convert_length_to_age_samples(
  K,
  Linf,
  L0,
  Lcv,
  Lbin_mat,
  LengthComp_lt,
  checkforbugs = TRUE
)

Arguments

K,

Brody growth coefficient

Linf,

Asymptotic maximum length

L0,

Expected length at age 0 from fitting a von Bertalanffy growth curve

Lcv,

coefficient of variation for size given expected length at age

Lbin_mat,

a matrix with two columns, where each row specifies the lower and upper length for a given length bin (the lowest should be -Inf, and highest Inf)

LengthComp_lt,

a matrix of length-composition data, where columns are samples in year t, and cells are the count of samples with a given length and year

checkforbugs,

a boolean stating whether to check for bugs or not

Value

AgeComp_at, a matrix of expected age-composition data, where columns are samples in year t, and cells are the count of samples with a given age and year


James-Thorson/CCSRA documentation built on Aug. 28, 2023, 7:51 a.m.