load_ss_extract_age_comps: Extract the age comp estimates from the SS assessment model...

View source: R/load-ss-extract-age-comps.R

load_ss_extract_age_compsR Documentation

Extract the age comp estimates from the SS assessment model output into a format required for input into the TMB assessment model

Description

Extract the age comp estimates from the SS assessment model output into a format required for input into the TMB assessment model

Usage

load_ss_extract_age_comps(
  ss_model = NULL,
  age_comps_fleet = 1,
  start_yr = NULL,
  end_yr = NULL,
  age_comps_fill = -1,
  yr_col = "yr",
  age_comps_fleet_col = "fleet",
  age_col = "age",
  value_col = "50%",
  ...
)

Arguments

ss_model

SS model input/output as read in by load_ss_model_data()

age_comps_fleet

1 for fishery, 2 for survey

start_yr

If not NULL, remove all years prior to this

end_yr

If not NULL, remove all years after this

age_comps_fill

Value to replace NAs in the table, it can also be NA, but not NULL

yr_col

The name of the column in ss_model$extra_mcmc$age_comps that contains the year

age_comps_fleet_col

The name of the column in ss_model$extra_mcmc$age_comps that contains the fleet code

...

Arguments absorbed which are meant for other functions

Details

Proportions at age for each year are calculated and returned

Value

The matrix representing all years from start_yr to end_yr with data included for years which are found in the ss_model data. Years not in the ss_model data will be filled with the value of age_comps_fill


pacific-hake/pacifichakemse documentation built on June 11, 2024, 4:07 a.m.