View source: R/get_weighted_current.r
get_weighted_current | R Documentation |
Calculate current weight-at-age for landings and discards. This is code from the Beaufort Assessment Model converted from ADMB to R.
get_weighted_current(
rdat,
selpar_n_yrs_wgted = 3,
duplicate_sel = data.frame(from = NULL, to = NULL),
wgt_klb = NULL,
wgt_klb_L = NULL,
wgt_klb_D = NULL
)
rdat |
BAM output rdat file object |
selpar_n_yrs_wgted |
Number years at end of time series over which to average sector Fs, for weighted selectivities. Almost always set to 3 in BAM. numeric vector |
duplicate_sel |
Specify if selectivities should be duplicated for certain fleets. Otherwise the function assumes that each fleet with F values has a selectivity defined with a fleet abbreviation matching abbreviation used in columns of rdat$parm.cons with "log_avg_F" in the name. Must be specified as a list; e.g. duplicate_sel = data.frame("from"="HB_D","to"="GR_D"), specifies that the selectivity matrix indicated by the abbreviation HB_D should be copied with a name using the abbreviation GR_D. |
wgt_klb |
Weight-at-age in thousand pounds for fish in the population. |
wgt_klb_L |
Weight-at-age in thousand pounds for fish in the landings. |
wgt_klb_D |
Weight-at-age in thousand pounds for fish in the discards. |
Kyle Shertzer and Nikolai Klibansky
## Not run:
get_weighted_current(rdat = rdat_Tilefish)
# In some cases you need to duplicate the selectivity of one fleet to fill in for another, if that was done in the assessment
get_weighted_current(rdat = rdat_VermilionSnapper, duplicate_sel = data.frame("from"="HB_D","to"="GR_D"))
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.