get_most_recent_model_objects.RdThis function retrieves the most recent model objects for each model name, site, year, stream, etc. You can
specify model_object (the full fit object, either BUGS or stanfit, the model plot (a posterior predictive check plot), or
the inputs used to fit the associated model object.
get_most_recent_model_objects(
con,
model_component = "model_fit",
access_key = Sys.getenv("AZ_CONTAINER_ACCESS_KEY"),
model_name = NULL,
stream = NULL
)A connection object to the database.
A choice of model_fit, model_input or model_plot to pull.
Can be left empty. If provided, must be one of pcap_all, bt_spas_x,
pcap_mainstem, p2s, inseason, or stock_recruit
Can be left empty. If provided, must be one of battle creek,
clear creek, deer creek, mill creek, feather river, butte creek,
sacramento river, or yuba river.
A the most recent model fit objects, inputs, or plots. The format will be a named list,
where each element is named by the model_run_id, model_name, site, stream, and year.