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

Change scenario_best_of to also compute the scenarios instead of just comparing them #36

Open
mjkanji opened this issue Dec 21, 2021 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@mjkanji
Copy link
Contributor

mjkanji commented Dec 21, 2021

It would be great and make our code far less verbose if scenario_best_of would compute the different scenarios alongside comparing them. I'm thinking we could pass in three different lists as arguments:

  • a list of the scenario functions we want to call,
  • a list with the corresponding data frames to use for each function (this could potentially just be moved into the list of arguments),
  • a list with the arguments to pass to each scenario function (this would thus be a list of lists)

And it would then compute everything.

@ElliottMess Thoughts?

@ElliottMess ElliottMess added the enhancement New feature or request label Dec 21, 2021
@ElliottMess
Copy link
Contributor

That sounds like a good improvement indeed to make the code more readable.

The list of data frames might indeed be superfluous as df is an argument to all scenario functions.

This would make the function much more complicated to use for external users though, as passing lists to functions is a bit out of the most common pipeline for tidyverse users. So it would be great to maintain the current usage, if possible.

@ElliottMess ElliottMess self-assigned this Jan 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants