make_halk {halk} | R Documentation |
Create a hierarchical age-length key (HALK)
Description
This function creates a hierarchically nested age-length key that can be used to estimate age of an organism based on proportion of sampled organisms in each age group.
Usage
make_halk(data, levels = NULL, age_col = "age", size_col = "length", ...)
Arguments
data |
A data.frame with age and size samples |
levels |
Character vector specifying the levels for HALK creation |
age_col |
Optional. String of the column name in |
size_col |
Optional. String of the column name in |
... |
Additional arguments passed to |
Value
A tibble
with columns for each level and
a column called alk that houses the age-length key for that particular level
Examples
make_halk(spp_data, levels = "spp")
[Package halk version 0.0.5 Index]