add_lengthgroups: Add length groups to Gadget StockStdPrinter output

Description Usage Arguments Examples

Description

Add length groups to Gadget StockStdPrinter output

Usage

1
2
add_lengthgroups(stock_data, length_groups, variable = "number",
  keep_zero_counts = FALSE)

Arguments

stock_data

A data.frame of stock data retrieved via get_stock_std or read_gadget_stock_std

length_groups

Numeric vector of length groups to distribute by. The difference in values probably should be the same as dl in Gadget model

variable

Character vector of the variable on which to distribute length groups. Default is "number". Can be "number.consumed" or "biomass.consumed"

Returns a wide data.frame similar to that of stock_data, but with values distributed across each length group which are represented as each column. The output of add_lengthgroup is meant to go directly to survey_gadget

keep_zero_counts

Logical. Keep year/step/area/age combinations with no individuals

Examples

1
cod_lendist <- add_lengthgroups(cod_stock_std$cod0, lengrps)

inspktrgadget/gadgetSim documentation built on May 10, 2019, 9:51 a.m.