R4EPI / sitrep

Report templates and helper functions for applied epidemiology
https://r4epi.github.io/sitrep/
GNU General Public License v3.0
40 stars 14 forks source link

add helpful warnings to add_weights_* #243

Closed aspina7 closed 2 years ago

aspina7 commented 4 years ago

so theres a lot of different variables that need to be called from different datasets for these functions.

And if you get one wrong the warning just gives the generic replacement zero but should be x long.

Maybe we should add in a check to the beginning of the function that makes sure those variable names exist in the appropriate datasets and if not chuck a warning saying this variable does not exist in this dataset, please double check.

On top of that, cluster names dont always match between the cluster counts file and the survey file (i know, pain, pain, so much pain) - not sure if its worth chucking a warning about how many match or dont?

aspina7 commented 4 years ago

also chuck in a warning about duplicate names in the cl data set (i.e. if clusters have been counted twice)