WorldHealthOrganization / anthro

Computation of the WHO Child Growth Standards
https://worldhealthorganization.github.io/anthro/
GNU General Public License v3.0
29 stars 9 forks source link

Fix bug in prevalence computation with NAs in group #52

Closed dirkschumacher closed 4 days ago

dirkschumacher commented 4 days ago

Fixed a bug during prevalence computation when a value used as a group (like sex) contains NA and at the same time all values in that group are NA as well. Previously this resulted in a hard stop of the computation, now the code gracefully handles it.

This is inline with how {survey} deals with NAs in group values.