Add create_cutting_test()
and multitest()
#215
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR introduces a new function
create_cutting_test()
. Similar tocreate_cutting()
, it is a function factory that generates functions that can easily be passed around. This enables us to do various new things.multitest()
. It allows running multiple tests at once on a cut data set. It currently returns a list because the test functions do not return consistent outputssim_gs_n()
argumenttest
to accept a list of test functions, one per cutting. This is mostly a proof of concept at the moment. More work will be required before we can support allowing multiple tests per cutting and mixing heterogenous tests (as it is currently writtensim_gs_n()
requires all the test results to be combined into a single output data frame)I also took the time to clean up some of the roxygen2 docs since I was the one who introduced a lot of the macros.
Lastly, I didn't touch
maxcombo()
in this PR, but you can imagine that we could also usecreate_cutting_test()
to be able to pass any arbitrary number of test functions tomaxcombo()
. But just like forsim_gs_n()
andmultitest()
, this would be facilitated by the test functions having consistent output.