mairindeith / fbwR

Other
0 stars 0 forks source link

Consider attaching some input parameters to the output of runFBW #1

Closed mkoohafkan closed 1 year ago

mkoohafkan commented 1 year ago

summarizeFBW() currently requires some values from the template (output of loadFromTemplate()) in order to summarize results. Consider copying the required input parameters (or all of them) as attributes of the output of runFBW(), to facilitate sharing of results.

attr(fish_passage_survival, "inputData") <- list(param_list = param_list, ressim = ressim)

mairindeith commented 1 year ago

Good idea - we will work on including these as outputs from the model run.

@ale-yanez - we'll want to ensure that the results sets include the input parameters both when summarized = TRUE and summarized = FALSE; such that the return object includes the inputs for all run types.

To keep inputs available throughout the user's application of fbwR, let's use these attributes through the summarize step as well. I will go ahead and modify the summarizeFBW() function to read the required data from the attributes, and to also return the param_list and ressim objects as attributes (e.g.,

param_list <- attributes(fish_passage_survival)$inputData$param_list
ressim <- attributes(fish_passage_survival)$inputData$ressim

...

attr(summary_list, "inputData") <- list(param_list = param_list, ressim = ressim)

)

See #2.