Skip to contents

This function calculates the upper bounds for catch data based on gear type, catch name, and weight type using the LocScaleB function for outlier detection.

Usage

get_catch_bounds(data = NULL, k = NULL)

Arguments

data

A data frame containing columns: gear, catch_taxon, weight_type, and catch_kg.

k

A numeric value used in the LocScaleB function for outlier detection.

Value

A data frame with columns: gear, catch_taxon, weight_type, and upper.up (upper bound).

Details

The function filters out rows where catch_taxon is "0" or "no_catch". It then splits the data based on the interaction of gear, catch_taxon, and weight_type. The get_bounds() function is applied to each group's catch_kg values. The resulting upper bounds are then combined and transformed back from log scale.