alk: Create An Age-Length Key

alkR Documentation

Create An Age-Length Key

Description

Creates an age-length key in numbers or proportions-at-age per size.

Usage

alk(age=NULL,size=NULL,binsize=NULL,type=1)

Arguments

age

a vector of individual age data.

size

a vector of individual size data.

binsize

size of the length class (e.g., 5-cm, 10, cm, etc.) used to group size data. The formula used to create bins is trunc(size/binsize)*binsize+binsize/2. If use of the raw length classes is desired, then binsize=0.

type

If type=1, numbers-at-age per size are produced. This format is used in functions alkprop, alkss, and alkD. If type=2, proportions-at-age per size are produced.

Details

Create age-length keys with either numbers-at-age per size class. Records with missing size values are deleted prior to calculation. Missing ages are allowed.

Value

A table of size, total numbers at size, and numbers (or proportions)-at-age per size class.

Author(s)

Gary A. Nelson, Massachusetts Division of Marine Fisheries gary.nelson@mass.gov

References

Quinn, T. J. and R. B. Deriso. 1999. Quantitative Fish Dynamics. Oxford University Press, New York, New York. 542 pages

See Also

alkD alkss alkprop

Examples

 ## Not run: 
  data(pinfish) 
  with(pinfish,alk(age=round(age,0),size=sl,binsize=10))
 
## End(Not run)

fishmethods documentation built on April 27, 2023, 9:10 a.m.

Related to alk in fishmethods...