# NOT RUN {
# Calculate weight-for-height (wfh) for the anthro3 dataset
addWGSR(data = anthro3,
sex = "sex",
firstPart = "weight",
secondPart = "height",
index = "wfh")
# Calculate weight-for-age (wfa) for the anthro3 dataset
addWGSR(data = anthro3,
sex = "sex",
firstPart = "weight",
secondPart = "age",
index = "wfa")
# Calculate height-for-age (hfa) for the anthro3 dataset
addWGSR(data = anthro3,
sex = "sex",
firstPart = "height",
secondPart = "age",
index = "hfa")
# Calculate MUAC-for-age (mfa) for the anthro4 dataset
## Convert age in anthro4 from months to days
testData <- anthro4
testData$age <- testData$agemons * (365.25 / 12)
addWGSR(data = testData,
sex = "sex",
firstPart = "muac",
secondPart = "age",
index = "mfa")
# }
Run the code above in your browser using DataLab