README.md

HEI

Travis-CI Build Status CRAN_Status_Badge codecov CRAN Downloads JOSS Publication

Overview

The goal of hei is to calculate Healthy Eating Index (HEI) scores from National Health and Nutrition Examination Survey (NHANES) data for use in dietary analyses. The HEI is a dietary metric designed by the USDA and NCI to gauge adherence to the US Dietary Guidelines.

Installation

hei is available on CRAN, and can be installed as follows:

install.packages("hei")

To install the development version hosted on this repository, use the devtools package and the following:

# install.packages("devtools")
devtools::install_github("timfolsom/hei")

Getting Started

library(hei)

The hei package contains one key function:

hei() takes as its arguments three data sets: an FPED data set, a NHANES dietary data set, and an NHANES demographic data set, returning a HEI score for each individual in the NHANES study being analyzed.

hei also includes get_fped() get_diet() and get_demo() for retrieving data from the Food Patterns Equivalents Database (FPED) and the NHANES dietary and demographic databases, respectively. The FPED data sets (in the public domain) retrieved by get_fped() are built into the package and have been converted to .csv files from the SAS data format in which they were originally published by their creators. get_diet() and get_demo() require the R package nhanesA which is employed to retrieve NHANES data sets directly from the web.

Related Work

hei is intended as a tool to aid in the analysis of NHANES data. It is important to be familiar with NHANES and its complex survey design as well as the FPED, which is derived from NHANES, before beginning any analyses involving the HEI.

Contributing

hei is licensed under the GNU General Public License Version 3. Questions, feature requests and bug reports are welcome via the issue queue. The maintainer will review pull requests and incorporate contributions at his discretion.



vpnagraj/hei documentation built on May 3, 2019, 6:41 p.m.