Learn R Programming

Tivy (version 0.1.1)

summarize_juveniles_by_group: Summarize juveniles by group

Description

Calculates juvenile percentages by specified groups, both in number and weight. Uses modern dplyr approach for efficient processing. Can auto-detect length columns if not specified.

Usage

summarize_juveniles_by_group(
  data,
  group_cols,
  length_cols = NULL,
  juvenile_limit = 12,
  a = 0.0012,
  b = 3.1242,
  remove_empty = TRUE,
  verbose = FALSE
)

Value

Data frame with juvenile statistics by group.

Arguments

data

Data frame with length frequency data.

group_cols

Vector of column names for grouping.

length_cols

Vector of length column names or indices. If NULL, auto-detection is attempted.

juvenile_limit

Length threshold for juveniles.

a

Coefficient of length-weight relationship.

b

Exponent of length-weight relationship.

remove_empty

Logical. Remove groups with no data.

verbose

Logical. Print information about detected columns.

Examples

Run this code
if (FALSE) {
juvenile_summary <- summarize_juveniles_by_group(
  data = fishery_data,
  group_cols = "date",
  juvenile_limit = 12
)
}

Run the code above in your browser using DataLab