Learn R Programming

Tivy (version 0.1.1)

convert_numbers_to_weight: Convert numbers to weight

Description

Converts numerical length frequencies to weight estimates using length-weight relationship.

Usage

convert_numbers_to_weight(data, length_cols, a, b)

Value

Data frame with original columns plus weight columns (prefixed with "weight_").

Arguments

data

Data frame with length frequency columns.

length_cols

Vector of length column names or numeric values.

a

Coefficient of the length-weight relationship.

b

Exponent of the length-weight relationship.

Examples

Run this code
if (FALSE) {
weight_data <- convert_numbers_to_weight(
  data = frequency_data,
  length_cols = c("8", "8.5", "9", "9.5", "10"),
  a = 0.0012,
  b = 3.1242
)
}

Run the code above in your browser using DataLab