I noticed in some exploratory code that if you input an observation with 60 months of age (given in months rather than days), then the function returns an NA for the Z-score, but not for the equivalent number days.
See for example:
If this were to be changed, it would be as simple as changing from < to <=. What are your thoughts on this? I just wanted to raise the issue in case it hadn't been discussed before, or if the above behavior was unintended.
Thanks for the excellent work on this package.
I noticed in some exploratory code that if you input an observation with 60 months of age (given in months rather than days), then the function returns an NA for the Z-score, but not for the equivalent number days. See for example:
Created on 2021-02-02 by the reprex package (v0.3.0)
The code doing this is here:
https://github.com/dirkschumacher/anthro/blob/855299eb35c48a57d56f191457d002a590ba5c5d/R/z-score-helper.R#L149
This occurs even though the WHO's own tables have values for 60 months, and when converted into days, the age (1826 days) is in the accepted range for the other functions, e.g. https://github.com/dirkschumacher/anthro/blob/855299eb35c48a57d56f191457d002a590ba5c5d/R/z-score-arm-circumference-for-age.R#L24
If this were to be changed, it would be as simple as changing from
<
to<=
. What are your thoughts on this? I just wanted to raise the issue in case it hadn't been discussed before, or if the above behavior was unintended.Thanks, BK