simplifySeason: Collapse season in age-based FLStock in FLIBM object

View source: R/simplifySeason.R View source: R/FLIBM.R

simplifySeasonR Documentation

Collapse season in age-based FLStock in FLIBM object

Description

The simplifySeason function takes an FLIBM object, which typically includes a season dimension, and returns an age-based FLStock object with the season dimension collapsed. The FLCore function simplify is first called in order to set up the yearly object, followed by additional changes to slots. Numbers slots are based on values from the beginning of the year, while average weight slots are weighted averages by year with numbers at season as the weighting. m.spwn and harvest.spwn are based on the seasonal spawning pattern weights as defined by obj$rec$params$season_wt.

The simplifySeason function takes an FLIBM object, which typically includes a season dimension, and returns an age-based FLStock object with the season dimension collapsed. The FLCore function simplify is first called in order to set up the yearly object, followed by additional changes to slots. Numbers slots are based on values from the beginning of the year, while average weight slots are weighted averages by year with numbers at season as the weighting. m.spwn and harvest.spwn are based on the seasonal spawning pattern weights as defined by obj$rec$params$season_wt.

Usage

simplifySeason(obj)

simplifySeason(obj)

Arguments

obj

Value

FLStock object with season dimension collapsed

FLStock object with season dimension collapsed

Examples

data(stk1)
plot(stk1$stock.a@stock.n)

stkYr <- simplifySeason(stk1)
stkYr <- stkYr[ac(1:range(stkYr)["max"]),] # remove age 0
plot(stkYr)


data(stk1)
plot(stk1$stock.a@stock.n)

stkYr <- simplifySeason(stk1)
stkYr <- stkYr[ac(1:range(stkYr)["max"]),] # remove age 0
plot(stkYr)



marchtaylor/FLIBM documentation built on Jan. 19, 2025, 10:56 p.m.