AgeEach: Assign age to each fish based on extant age-length data.

Description Usage Arguments Value Methods (by generic) Note Examples

View source: R/age_length.R

Description

AgeEach inspired by FSA::alkIndivAge. Here AgeEach output is more tailored for use within this package. AgeEach handles age assignment at the length bin level, so instance of an age-length key is not required.

Usage

1
2
3
4
AgeEach(data, len, age, lenBreaks, sex = NULL)

## S3 method for class 'AgeEach'
print(x, ...)

Arguments

data

A dataframe with length and age fields (columns).

len

Field name in data containing numeric lengths.

age

Field name in data containing nummeric ages.

lenBreaks

lenBreaks How lengths are binned. See cut for more information. (Supplied to breaks in cut.)

sex

(default NULL) Currently not used.

x

Object of class 'AgeEach'.

...

Currently not used.

Value

A list with age & bin diagnostics along with a numeric vector of ages, with length = nrow(data).

Methods (by generic)

Note

Print method for convenience of output.

Examples

1
2
3
# check range(trammel_catch[["FL"]])
len_breaks <- seq(from = 50, to = 220, by = 5)
#AgeEach(data = trammel_catch, len = FL, age = Age, lenBreaks = len_breaks)

jasondubois/sportfish documentation built on March 1, 2020, 10:04 p.m.