You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the defect
This error is reported by external user @Nyerere who tried to use spreadsheet, in their "lookup" tab there is empty values for Female / Male column, I tried to help debugging
To reproduce
Steps to reproduce the behavior:
Go to "Lookup Sheet", create a row with label but empty values for Male/Female
Run pacehrh::InitializePopulation()
Expected behavior
If these rows are not able to be used, they should be removed with a warning to the user
Actual Behavior
User is getting an error that they do not understand how to proceed
Error in if (sex == "f" && (lt$Female[i] == FALSE)) { :
missing value where TRUE/FALSE needed
Called from: FUN(X[[i]], ...)
The text was updated successfully, but these errors were encountered:
to do, we should at least give a warning or make these 2 values required.
I'm not sure this is the right answer either.
Sensible defaulting is a powerful tool for improving usability. In this case I would argue a few things:
In the absence of any other information, the most sensible default for the start of a range is the lowest possible value, and the most sensible default for the end of a range is the highest value.
Another basic principle is reducing the dependence on fixed hard-coded configuration values. The built-in age range is 0-100. Say the user has to explicitly enter 100 as the end point for any interval intended to represent "age X and above". Then say somebody decides to extend the built-in range to 110. Every hard-coded reference in configures ranges also has to change.
The argument that the user might not have intended this is countered by the argument that this might be exactly what they intended. "Age X and above" is a perfectly legitimate construct, so having a compact representation for it will (I expect) be seen by some users as a nice touch.
The idea that the system should generate a warning message any time it makes an implicit decision for the user is attractive, but the sheer volume of these informative messages could become a different problem. (Our standard model_inputs config file would generate 10 such warnings. Would we need a way to turn these warnings off if the system is system is in fact doing exactly the right thing for the user?)
Finally, we can discuss whether there's a better solution than a blank cell, perhaps a sentinel value like -1?
Describe the defect
This error is reported by external user @Nyerere who tried to use spreadsheet, in their "lookup" tab there is empty values for Female / Male column, I tried to help debugging
To reproduce
Steps to reproduce the behavior:
pacehrh::InitializePopulation()
Expected behavior
Actual Behavior
User is getting an error that they do not understand how to proceed
The text was updated successfully, but these errors were encountered: