R/update_ss3_weight_at_age.R

Defines functions update_ss3_weight_at_age

update_ss3_weight_at_age <- function(dir) {
  load(fs::path(hakedata_wd(), "length-weight-age", "LWAdata.Rdata"))
  filenameforss <- file.path(
    dir,
    paste0("wtatage_", max(yrs), "created_", format(Sys.time(), "%d-%b-%Y_%H.%M"), ".ss")
  )
  unlink(x = c(filenameforss))
  write_wtatage_file(
    file = filenameforss,
    data = withforecast,
    maturity = maturity
  )
  return(filenameforss)
}
pacific-hake/hake-assessment documentation built on Jan. 19, 2025, 1:44 p.m.