reweight_discards: reweight_discards beta a function to re-weight observed...

Description Usage Arguments

View source: R/reweight_discards.R

Description

reweight_discards beta a function to re-weight observed discard rates from WCGOP data based on pre/post catch-shares years returns a table that can be saved/copied into a stock synthesis file. Assumes the ncs/cs dataframes are in the traditional format as from the Observer program

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
reweight_discards(
  ncs,
  cs,
  fleet,
  fleetno = 1,
  month = 7,
  years,
  units,
  writeTable = F,
  writeloc = paste0(getwd(), "discard_rates_ss_", Sys.Date(), ".csv")
)

Arguments

ncs

a data frame of non-catch-shares observer data

cs

a data frame of catch-shares observer data

fleet

a string or vector of strings matching values from column gear3

fleetno

optional; fill in any number to the "FltSvy" column of the resultant table

month

optional; fill in a month into the month column of the resultant table

years

optional; if you'd like to only take a subset of years from the final dataframe

writeTable

logical. if T, requires writeloc

writeloc

a filepath to where you want the table saved.


mkapur/kaputils documentation built on Nov. 14, 2021, 3:23 a.m.