print.greensIndex {nipnTK} | R Documentation |
print()
helper function for print.greensIndex()
function
Description
print()
helper function for print.greensIndex()
function
Usage
## S3 method for class 'greensIndex'
print(x, ...)
Arguments
x |
Object resulting from applying the |
... |
Additional |
Value
Printed output of greensIndex()
function
Examples
# Apply Green's Index using anthropometric data from a SMART survey in Sudan
# (flag.ex01)
svy <- flag.ex01
svy$flag <- 0
svy$flag <- ifelse(!is.na(svy$haz) & (svy$haz < -6 | svy$haz > 6), svy$flag + 1, svy$flag)
svy$flag <- ifelse(!is.na(svy$whz) & (svy$whz < -5 | svy$whz > 5), svy$flag + 2, svy$flag)
svy$flag <- ifelse(!is.na(svy$waz) & (svy$waz < -6 | svy$waz > 5), svy$flag + 4, svy$flag)
svy <- svy[svy$flag == 0, ]
svy$stunted <- ifelse(svy$haz < -2, 1, 2)
gi <- greensIndex(data = svy, psu = "psu", case = "stunted")
print(gi)
[Package nipnTK version 0.2.0 Index]