Learn R Programming

mizer (version 2.0.3)

validGearParams: Check validity of gear parameters and set defaults

Description

The function returns a valid gear parameter data frame that can be used by setFishing() or it gives an error message.

Usage

validGearParams(gear_params, species_params)

Arguments

gear_params

Gear parameter data frame

species_params

Species parameter data frame

Value

A valid gear parameter data frame

Details

If gear_params is empty, then this function tries to find the necessary information in the species_params data frame. This restricts each species to be fished by only one gear. Defaults are used for information that can not be found in the species_params dataframe, as follows:

  • If there is no gear column, each species gets its own gear, named after the species.

  • If there is no sel_func column or it is NA then knife_edge is used.

  • If there is no catchability column or it is NA then this is set to 1.

  • If the selectivity function is knife_edge and no knife_edge_size is provided, it is set to w_mat.