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 7 months ago

fredjaya commented 8 months 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 8 months ago

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

fredjaya commented 7 months 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.