A fair and valid point. I would think in that case that having good initial checks in every relevant function is a suitable alternative. These errors (and warnings I guess, if applicable) should have informative and clear messages when crucial data is lacking.
I don't know if that already exists sufficiently? If it does then happy to close this, otherwise I would suggest we open a new issue in pacta.data.preparation to ensure something like
"input data in every exported data processing function in pacta.data.preparation is checked for crucial inputs".
NIT: Effective logging would help this further (i know i know) to be able to quickly ascertain where hiccups are happening for those that DON'T run this in RStudio.
Some of the functions in this repo have a data argument as well as additional arguments specifying specific values to be used in the data input. It would be advantageous for functions like this to first check if the desired options can be achieved by verifying that they are available in the input data, and if not, providing an informative error about why it cannot work as expected.
Originally posted by @jdhoffa in https://github.com/RMI-PACTA/workflow.data.preparation/issues/11#issuecomment-1931942087
Some of the functions in this repo have a data argument as well as additional arguments specifying specific values to be used in the data input. It would be advantageous for functions like this to first check if the desired options can be achieved by verifying that they are available in the input data, and if not, providing an informative error about why it cannot work as expected.