R/update_2s.R
update_2s.Rd
This function modernizes scripts developed by Jon Carey and Derek Dapp to update and overwrite Chinook age 2 recruit scalers in a database run. It calculates the ratio of the provided forecast age 2 abundance to the existing mature cohort abundance, and then multiplies that ratio against the existing recruit scaler.
update_2s(chinrs, db, runID)
string, path to "ChinRSScalers" file with provided a2s
string, file path to database
numeric, RunID to be altered
Nothing, but database tables are altered.
if (FALSE) {
#note that reads from xlsm ChinRSScaler files can be very slow
#due to old/leftover sheet names & connections
update_2s("path/to/ChinRSScalarsMR21.xlsm", "path/to/Chinook_FRAM_Database.mdb", runID = NNN)
}