print.greensIndex | R Documentation |
print()
helper function for print.greensIndex()
functionprint()
helper function for print.greensIndex()
function
## S3 method for class 'greensIndex'
print(x, ...)
x |
Object resulting from applying the |
... |
Additional |
Printed output of greensIndex()
function
# 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.