get_diet: NHANES dietary data retrieval.

Description Usage Arguments Value References Examples

View source: R/get_diet.R

Description

get_diet returns an abridged National Health and Nutrition Examination Survey (NHANES) dietary data set for a given year.

Usage

1
get_diet(year, day)

Arguments

year

year combination of data set to retrieve ... must be one of the following:

  • "2005/2006"

  • "2007/2008"

  • "2009/2010"

  • "2011/2012"

  • "2013/2014"

day

identifier for survey day to retrieve ... must be one of the following:

  • "first" (data for study participants from first day)

  • "second" (study participant data from second day)

  • "both" (data for study participants present in both days, with values averaged across the two days)

Value

Object of class data.frame containing a modified NHANES dietary data set for a specified year and day. The complete NHANES dietary data set contains several more variables than are necessary for computing HEI scores. The data set returned by this function has been trimmed down to contain (in addition to an NHANES unique sequence identifier for each participant) only the columns of data needed for HEI score calculation, specifically:

References

https://www.cdc.gov/nchs/nhanes/nhanes_questionnaires.htm

Examples

1
2
3
4
5
## Not run: 
get_diet("2009/2010", "both")
get_diet("2009/2010", "first")

## End(Not run)

hei documentation built on Aug. 18, 2017, 1:03 a.m.