Learn R Programming

fishmethods (version 1.3-0)

alk: 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.

Value

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

Details

Create age-length keys with either numbers-at-age per size class. Records with NA are deleted prior to calculation.

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

Run this code
data(striper) 
alk(age=striper$age,size=striper$tl,binsize=50)

Run the code above in your browser using DataLab