AngusMcLure / PoolPoweR

Power and sample size calculations for surveys using pool testing (AKA group testing)
GNU General Public License v3.0
0 stars 1 forks source link

Add helper function for input variable checks #2

Closed fredjaya closed 1 year ago

fredjaya commented 1 year ago

Add checks to ensure input variables are sensible. Required for all end-user functions.

As a lot of input variables are shared across functions, I think it is worth having helper functions for this and placing them in a dedicated util file like R/util_variable_checks.R.

Ideas:

These should be general and will exclude function-specific ones like checking pool_size and pool_number vectors are the same length.

AngusMcLure commented 1 year ago

Yes, this makes sense and will make it more robust with minimal code duplication

fredjaya commented 1 year ago

All done with full test coverage for the user-facing functions:

Will make a new issue for the upcoming period_sampling ones once merged.