Bai-Li-NOAA / Age_Structured_Stock_Assessment_Model_Comparison

Other
0 stars 6 forks source link

Wrapper for `ASSAMC::run_om()` to create example data #7

Open kellijohnson-NOAA opened 2 years ago

kellijohnson-NOAA commented 2 years ago

Is your feature request related to a problem? Please describe. Need to easily and reproducibly create data from @Bai-Li-NOAA's operating model. Scripts are hard to maintain, share, and show people salient points of what they actually need to know, i.e., I want to hide a bunch of stuff in a function.

Describe the solution you'd like I would like to be able to run one line of code to generate data from ASSAMC::run_om(). For example, ASSAMC::eg_omobject(), ASSAMC::example_omobject(), or something that clearly shows we are running an example.

Describe alternatives you've considered

  1. Keep code in a .R script that can be sourced.
  2. Source the relevant section of @Bai-Li-NOAA's README.md file using web-scraping techniques.
  3. Ask @Bai-Li-NOAA to parse out the code found in Useage to a separate file that can be sourced for her README and used here.
  4. We might be able to just have an example in @examples for ASSAMC::run_om() that could be sourced using example(ASSAMC::run_om)

@Bai-Li-NOAA let me know which alternative you prefer and I am happy to open a pull request from my fork or however you would like.

k-doering-NOAA commented 2 years ago

I like this idea! It seems like it would get a lot of use during FIMS testing.

kellijohnson-NOAA commented 2 years ago

Another option/addition would be to

  1. Create a data object using the script that could be accessed. That way we could have two objects, one for C1 and one for C2 and it would be faster because the objects would already exist.
Bai-Li-NOAA commented 2 years ago

@kellijohnson-NOAA and @k-doering-NOAA , great suggestion! I like the combination of option 1 and 5, so we can have R script that generates/reproduce data objects. We will set up ~12 cases for testing FIMS later and we can easily change input values to create different data objects this way.

I just added both of you as collaborators to the repo. Please feel free to create a branch to work on it.