The function returns a valid gear parameter data frame that can be used
by setFishing() or it gives an error message.
Details
The gear_params data frame is allowed to have zero rows, but if it has rows, then the following requirements apply:
There must be columns
speciesandgearand any species - gear pair is allowed to appear at most once. Any species that appears must also appear in thespecies_paramsdata frame.There must be a
sel_funccolumn. If a selectivity function is not supplied, it will be set to "knife_edge".There must be a
catchabilitycolumn. If a catchability is not supplied, it will be set to 1.All the parameters required by the selectivity functions must be provided.
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
gearcolumn or it is NA then a new gear named after the species is introduced.If there is no
sel_funccolumn or it is NA thenknife_edgeis used.If there is no
catchabilitycolumn or it is NA then this is set to 1.If the selectivity function is
knife_edgeand noknife_edge_sizeis provided, it is set tow_mat.
The row names of the returned data frame are of the form "species, gear".
When gear_params is NULL and there is no gear information in
species_params, then a gear called knife_edge_gear is set up with a
knife_edge selectivity for each species and a knive_edge_size equal to
w_mat. Catchability is set to 0.3 for all species.
