validSpeciesParams {mizer}R Documentation

Validate species parameter data frame

Description

Check validity of species parameters.

Usage

validSpeciesParams(species_params)

Arguments

species_params

The user-supplied species parameter data frame

Value

A valid species parameter data frame

This function throws an error if

If a weight-based parameter is missing but the corresponding length-based parameter is given, as well as the a and b parameters for length-weight conversion, then the weight-based parameters are added. If both length and weight are given, then weight is used and a warning is issued if the two are inconsistent.

If a w_inf column is given but no w_max then the value from w_inf is used. This is for backwards compatibility.

Some inconsistencies in the size parameters are resolved as follows:

The row names of the returned data frame will be the species names. If species_params was provided as a tibble it is converted back to an ordinary data frame.

The function tests for some typical misspellings of parameter names, like wrong capitalisation or missing underscores and issues a warning if it detects such a name.

Note that the species parameters returned by this function are not guaranteed to produce a viable model. More checks of the parameters are performed by the individual rate-setting functions (see setParams() for the list of these functions).

See Also

species_params()


[Package mizer version 2.5.1 Index]