Description Usage Arguments Value References Examples
hei
calculates a Health Eating Index (HEI) score for individuals in the National Health and Nutrition Examination Survey (NHANES) studies based on input dietary, demographic and Food Pattern Equivalent Database (FPED) data.
1 |
fped |
Food Pattern Equivalent Database data; see get_fped |
diet |
dietary data from NHANES database; see get_diet |
demograph |
demographic data from NHANES database; see get_demo |
agethresh |
numeric threshold for age in years of survey participants to be included; any individual less than the value specified will be excluded; defaults to 2 |
verbose |
Boolean indicating whether or not all columns from processed data should be output; default is
|
Object of class data.frame
; defaults to only include columns for respondent identifier, age, and overall HEI score of each individual; this can be overridden with the verbose
parameter to output all columns of the input data sets as well as 33 columns of calculated data related to HEI scoring and, significantly, a 70th column containing the total HEI score for each participant.
https://www.cnpp.usda.gov/healthyeatingindex
1 2 3 4 5 6 7 8 9 10 11 12 | ## Not run:
fped0910 <- get_fped("2009/2010", "both")
diet0910 <- get_diet("2009/2010", "both")
demo0910 <- get_demo("2009/2010")
hei(fped0910,diet0910,demo0910)
fped0506 <- get_fped("2005/2006", "first")
diet0506 <- get_diet("2005/2006", "first")
demo0506 <- get_demo("2005/2006")
hei(fped0506,diet0506,demo0506, agethresh = 18)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.