predict_age: Predict age

View source: R/alks.R

predict_ageR Documentation

Predict age

Description

Given fish length, predict age from empirical age group propotions.

Usage

predict_age(l, alk)

Arguments

l

Fish length

alk

An alk-tibble with cum age group props by length

Details

For a single fish at a time, used inside a 'purrr::map_dbl'-call

Value

Stochastic age

Examples

## Not run: fishData %>%
  filter(!is.na(a)) -> alk_data
alk <- make_alk(alk_data)
set.sed(2345)
predict_age(15,alk)
predict_age(15,alk)
set.seed(2345)
predict_age(15,alk)
purrr::map_dbl(9:19,predict_age,alk=alk)
  
## End(Not run)

sigurdurthorjonsson/bionechi documentation built on Jan. 25, 2023, 6:37 p.m.