Learn R Programming

Tivy (version 0.1.1)

calculate_juvenile_statistics: Calculate juvenile statistics for a group

Description

Helper function that calculates juvenile percentages in number and weight. Used internally by summarize_juveniles_by_group.

Usage

calculate_juvenile_statistics(
  frequencies,
  length_values,
  juvenile_limit = 12,
  a = 0.0012,
  b = 3.1242
)

Value

Data frame with juvenile statistics.

Arguments

frequencies

Numeric vector of frequencies by length.

length_values

Numeric vector of corresponding lengths.

juvenile_limit

Length threshold for juveniles.

a

Coefficient of length-weight relationship.

b

Exponent of length-weight relationship.

Examples

Run this code
frequencies <- c(10, 15, 25, 30, 20, 10)
lengths <- c(8, 9, 10, 11, 12, 13)
stats <- calculate_juvenile_statistics(frequencies, lengths)

Run the code above in your browser using DataLab