pacific-hake / hake-assessment

:zap: :fish: Build the assessment document using latex and knitr
MIT License
13 stars 6 forks source link

Come up with a better way to do `bridge_model_end_yr` #1103

Open cgrandin opened 10 months ago

cgrandin commented 10 months ago

In doc/load-models.R. Currently it is manually done, and a huge pain to get right

kellijohnson-NOAA commented 10 months ago

Can't we just use the end year of the data file in the loaded model?

find_end_yr <- function(model_list) {
  model_list[["dat"]][["end_yr"]]
}
purrr::map(bridge_models, find_end_yr)

NOTE the above code was not tested it is just what I am thinking 🤔 will work in my head.

cgrandin commented 10 months ago

I know I tried that and there was some reason it wouldn't work, but I will start there. Thanks :)