modal_length: Modal length from length data

View source: R/data_process.R

modal_lengthR Documentation

Modal length from length data

Description

Calculates the annual modal length from the length data, which can be used to select Lc. Note: Modal length can change over time for many reasons, including a change in mortality (Hordyk et al. 2015), recruitment, or selectivity (Huynh et al. 2017).

Usage

modal_length(MLZ_data, length.slot = c("Len_df", "Len_matrix"),
  breaks = NULL, figure = TRUE)

Arguments

MLZ_data

An object of class MLZ_data.

length.slot

Name of slot in MLZ_data from which to calculate modal lengths, either: Len_df or Len_matrix. Only used if there are data in both slots.

breaks

Only used for Len_df. An optional vector for breaks for bin_length.

figure

If TRUE, a plot is also drawn.

Details

Length frequency matrix from Len_df are created by using hist function.

Value

A data frame of plotted values.

References

Hordyk, A. Ono, K., Sainsbury, K., Loneragan, N., and Prince, J. 2015. Some explorations of the life history ratios to describe length composition, spawning-per-recruit, and the spawning potential ratio. ICES Journal of Marine Science 72:204-216.

Huynh, Q.C, Gedamke, T., Hoenig, J.M, and Porch C. 2017. Multispecies Extensions to a Nonequilibrium Length-Based Mortality Estimator. Marine and Coastal Fisheries 9:68-78.

Examples

## Not run: 
data(Nephrops)
modal_length(Nephrops)

data(SilkSnapper)
new.dataset <- new("MLZ_data", Year = 1983:2013, Len_df = SilkSnapper)
modal_length(new.dataset)
modal_length(new.dataset, breaks = seq(80, 830, 10))

## End(Not run)

MLZ documentation built on March 29, 2022, 9:07 a.m.