View source: R/utils-calc-lw-params.R
calc_lw_params | R Documentation |
Calculate length-weight relationship parameters for the data with both length and weight data, given one or more grouping variables.
calc_lw_params(d, grouping_cols = "year", lw_tol = 0.1, lw_maxiter = 1000)
d |
A data frame as returned by |
grouping_cols |
A vector of character strings matching the names
of the columns you want to group for. i.e. |
lw_tol |
See |
lw_maxiter |
See |
If the column lw_alpha
already exists in the input data frame d
,
the calculated parameters lw_alpha
and lw_beta
will be coalesced
with the input ones. This means they will be combined together similar to
a union or left join. The input parameter values will take precedence and
the NA
values found in that column will be replaced with the parameter
estimates calculated here with fit_lw()
.
The original data frame with the columns lw_alpha
and lw_beta
added (if necessary). If those columns exist, they will be overwritten
with NA
s and values calculated where data exist
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.