library(magrittr)
# Define a stock with 3 lengthgroups and 3 ages
stock <- g3_stock('name', c(1, 10, 100)) %>%
g3s_age(5, 10)
# Use stock_instance to see what the array would look like
g3_stock_instance(stock)
# Define a stock that groups age into "young" and "old"
stock <- g3_stock('name', c(1, 10, 100)) %>%
g3s_agegroup(list(
young = 5:7,
old = 8:10))
# Use stock_instance to see what the array would look like
g3_stock_instance(stock)
Run the code above in your browser using DataLab