calc_ML: Calculate mean lengths >= Lc

View source: R/data_process.R

calc_MLR Documentation

Calculate mean lengths >= Lc

Description

Calculates mean lengths from length data and Lc for class MLZ_data.

Usage

calc_ML(MLZ_data, length.slot = c("Len_df", "Len_matrix"),
  sample.size = TRUE)

Arguments

MLZ_data

An object of class MLZ_data.

length.slot

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

sample.size

If TRUE, then the annual sample sizes will be calculated by summing the cells in slot Len_matrix. Otherwise, sample sizes are set to 0 or 1 (whether mean lengths are calculated).

Value

An object of class MLZ_data to fill slots MeanLength, ss.

Examples

## Not run: 
data(Nephrops)
Nephrops <- calc_ML(Nephrops, sample.size = FALSE)
Nephrops@MeanLength
plot(Nephrops)

## End(Not run)

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