vb_len: Von Bertalanffy (VB) age to length function

View source: R/vb_len.r

vb_lenR Documentation

Von Bertalanffy (VB) age to length function

Description

Converts age to length with a Von Bertalanffy function

Usage

vb_len(a, Linf, K, t0, aP = 0)

Arguments

a

ages to convert to lengths

Linf

length infinity

K

growth coefficient

t0

age (time) at length zero

aP

proportion of age (value between 0 and 1) at which to compute length (e.g. aP=0.5 to compute length at midyear)

Author(s)

Nikolai Klibansky

Examples

## Not run: 
# Use data for Black Sea Bass
rdat <- rdat_BlackSeaBass
aser <- rdat$a.series
age <- aser$age
len <- aser$length
parest <- rdat$parm.cons[8,]

# Convert age to length
len_out <- with(parest,{vb_len(a=age,Linf=Linf,K=K,t0=t0)})
len_out

# Convert length to age
age_out <- with(parest,{vb_age(L=len,Linf=Linf,K=K,t0=t0)})
age_out

# Note that vb_age is not quite the inverse of vb_len unless t0 = 0
# Convert length to age
with(parest,{vb_age(L=with(parest,{vb_len(a=age,Linf=Linf,K=K,t0=0)}),Linf=Linf,K=K,t0=0)})

## End(Not run)


nikolaifish/bamExtras documentation built on July 21, 2023, 8:26 a.m.