Skip to contents

Filters and aggregates age-at-length data for a species, rounding lengths down to the nearest cm and aggregating counts by quarter. Returns a tidy data frame with columns survey_date, Length, K, and count.

Usage

preprocess_length_at_age(params, species, age_at_length)

Arguments

params

A mizer::MizerParams object, with scientific names contained in the species_params column "Scientific_name"

species

Species name as in species_params(params)$species.

age_at_length

Data frame with at least the columns Scientific_name, Quarter, LngtClass, Age, and CANoAtLngt.

Value

A data frame with the columns described above, one row per quarter-length-age combination.

Examples

# Using package data would typically look like:
# df <- preprocess_length_at_age(params, species = "Cod", age_at_length = your_df)