Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Empty Scenario list objects in run_fredi outputlist=TRUE option #215

Open
tonygard-indecon opened this issue Jan 22, 2025 · 0 comments
Open
Assignees
Labels
bug Something isn't working

Comments

@tonygard-indecon
Copy link
Collaborator

tonygard-indecon commented Jan 22, 2025

Description:
If you run FrEDI with outputlist =TRUE to return a list object with scenario input data, it returns an empty scenario list object. This is on the "main" branch.

Reprex: Set your working directory to main branch FrEDI and run -

library(devtools)
load_all(".")

test <- run_fredi(outputList = TRUE)

test$scenarios

The issue:
On this commit you can see on Lines 406-416, after the default scenario is added to the inputsList if scenario data is missing, the reassignment of inputs to the returnlist object was deleted during the refactoring. In the current main "run_fredi" you'll see on line 689 when we finalize the returnList object, it assigns returnList[["scenarios"]] which only gets initialized on line 219 as an empty list and never gets redefined.

Proposed Solution:
After the check for inputs, and if missing the default scenarios are assigned (L500-L515)-

  1. Check outputslist for TRUE
  2. assign the inputs list to the object lists of statusList, argsList, and returnList across names in the inputsList
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants