Helper function for converting lengths to length groups. Note: This is not a general-purpose function — the output midpoints defining the groups are aligned with DFO-specific methods and labeling conventions.

group_lengths(length, group)

Arguments

length

Numeric vector of lengths to be grouped. Used with base::findInterval().

group

Numeric value specifying the width of the length group (i.e., bin size).

Value

A numeric vector indicating the midpoint of the assigned length group.