Calculates numbers-at-length for each haul and stores the result in the
HH table of a DATRASraw object as matrix N, with one row per haul and
one column per length class.
Usage
add_numbers_at_length(x, cm_breaks = NULL, by = get_accuracy_cm(x))Arguments
- x
A
DATRASrawobject.- cm_breaks
Numeric vector of break points defining the length classes in cm. If
NULL, break points are created automatically from the observed range ofHL$LngtCmusingby.- by
Numeric scalar giving the width of the default length classes in cm. Defaults to the survey's native recording resolution via
get_accuracy_cm(). Only used whencm_breaks = NULL.
Details
By default, numbers-at-length are calculated using the available haul-level
length data in HL and the default length recording resolution of the data.
The function first adds numbers-at-length at the finest available length
resolution and stores the result as x[["HH"]][["N"]].
The applied break points are stored as attribute cm.breaks on the returned
object.
