sim_vonB {SimSurvey} | R Documentation |
Closure for simulating length given age using von Bertalanffy notation
Description
This function outputs a function which holds the parameter values supplied and the function either simulates lengths given ages or generates a length age key give a sequence of ages.
Usage
sim_vonB(
Linf = 120,
L0 = 5,
K = 0.1,
log_sd = 0.1,
length_group = 3,
digits = 0,
plot = FALSE
)
Arguments
Linf |
Mean asymptotic length |
L0 |
Length at birth |
K |
Growth rate parameter |
log_sd |
Standard deviation of the relationship in log scale |
length_group |
Length group for length age key. Note that labels on the matrix produced are
midpoints using the DFO conventions; see |
digits |
Integer indicating the number of decimal places to round the values to |
plot |
Produce a simple plot of the simulated values? |
Value
Returns a function for use inside sim_abundance
.
Examples
growth_fun <- sim_vonB(Linf = 100, L0 = 5, K = 0.2, log_sd = 0.05, length_group = 1, plot = TRUE)
growth_fun(age = rep(1:15, each = 100))
growth_fun(age = 1:15, length_age_key = TRUE)
sim_abundance(growth = sim_vonB(plot = TRUE))
[Package SimSurvey version 0.1.6 Index]