Skip to contents

Calculate weight-at-length using lookup length-weight parameters from the species_info table and add the resulting weight fields to the HL table of a datras_raw / DATRASraw object.

Usage

add_total_weight_by_haul_fishglob(x)

Arguments

x

A datras_raw object containing HL and HH tables.

Value

A datras_raw object with the HL table updated to include the additional columns:

  • Wgt_indiv: estimated individual weight in grams,

  • Wgt_total: estimated total weight for the record in kilograms.

Details

The function merges the HL table with internal species information to obtain lookup length-weight parameters (aFG and bFG), computes individual weight from length, and then calculates total weight for each length class record.

Weight-at-length is calculated for each HL record as: $$ Wgt\_indiv = aFG \times LngtCm^{bFG} $$

where LngtCm is fish length in centimetres and aFG and bFG are lookup species-specific length-weight parameters obtained from the internal species_info data.

Total weight per record is then calculated as: $$ Wgt\_total = Wgt\_indiv \times Count $$

Individual weight is first computed in grams and total weight is returned in kilograms.

Only species belonging to the classes Teleostei, Elasmobranchii, Petromyzonti, and Myxini are retained in the join with species_info.

A warning is issued if species are present in the joined data but have missing length-weight parameters.

Examples

if (FALSE) { # \dontrun{
x <- add_total_weight_by_haul_fishglob(x)
} # }