convert_numbers_to_weight {Tivy} | R Documentation |
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)
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. |
Value
Data frame with original columns plus weight columns (prefixed with "weight_").
Examples
## Not run:
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
)
## End(Not run)
[Package Tivy version 0.1.1 Index]