Estimate fish weights from potentially sex-specific weight-length relationship parameters returned from getWLpars.

getweight(length, sex, pars, unit.out = c("lb", "kg"), weight, unit.in)

Arguments

length

A vector of fish lengths in mm.

sex

A vector of sexes for each entry in length. Entries must be one of the following: 'U', 'F', 'M', or 'H'.

pars

A data frame of parameters for the weight-length relationship as determined from empirical data. The data frame must have columns of 'A' and 'B', as well as rows named 'U', at a minimum, 'F', and 'M'. The output from getWLpars is formatted correctly as is.

unit.out

The desired units you wish the output to be in. See the function call for a list of default units available within the function. For example, "lb" would return the units of pounds.

weight

A vector of fish weights, where the units for each measurement are specified in unit.in.

unit.in

A vector of units for each measurement in weight. Options include KG, G, LB, UNK. Where, the latter leads to the assumption that your units are in grams and will be converted as such.

Value

A vector of measurements in the unit specified using unit.out. If weights were provided, then the weights are also the output. If lengths were provided, then they are converted to weights. Where, weights are determined from lengths and weight-length parameters input to the function. Weights are in the same units used to calculate things, i.e., kg.

Author

Kelli F. Johnson