calc_lw_params: Calculate the length-weight relationship parameters for the...

Description Usage Arguments Value

View source: R/get-age-data.R

Description

Calculate the length-weight relationship parameters for the data with both length and weight, given a grouping variable

Usage

1
2
3
4
5
6
7
calc_lw_params(
  d,
  grouping_cols = "year",
  lw_cutoff = 10,
  lw_tol = 0.1,
  lw_maxiter = 1000
)

Arguments

d

The data frame as extracted using fetch_sample_data()

grouping_cols

A vector of character strings matching the names of the columns you want to group for

lw_cutoff

How many length-weight records are required per sample to use the length-weight model for that sample. If less than this, the overall yearly values will be used

lw_tol

See fit_lw()

lw_maxiter

See fit_lw()

Value

The original data frame with the columns lw_alpha and lw_beta added (if necessary). If those columns exist, they will be overwritten with NAs and values calculated where data exist


pbs-assess/hakedata documentation built on Jan. 16, 2021, 9:15 p.m.