Skip to contents

Calculate the HEI2015 for the ASA24 data within 1 step

Usage

HEI2015_ASA24(DATA_PATH, RECALL_SUMMARIZE = TRUE)

Arguments

DATA_PATH

The file path for the data. The file name should be like: Totals.csv.

RECALL_SUMMARIZE

If TRUE, the function calculates total food group and nutrient intake over all possible days and then average them by reporting dietary index per individual per day. If FALSE, the function calculates dietary index per individual per recall.

Value

The average HEI2015 and its component scores for each individual per day.

Examples

data("ASA24_exp")
HEI2015_ASA24(ASA24_exp, RECALL_SUMMARIZE = TRUE)
#> [1] "RECALL_SUMMARIZE = TRUE, summarizing HEI2015 for ASA24 data by averaging over all possible recalls per person per day..."
#> # A tibble: 21 × 17
#> # Groups:   UserName, UserID [21]
#>    UserName UserID            TOTALKCAL HEI2015_ALL HEI2015_TOTALFRT HEI2015_FRT
#>       <dbl> <chr>                 <dbl>       <dbl>            <dbl>       <dbl>
#>  1        1 e6541891-8a22-49…     1514.        69.8             1.26        2.45
#>  2        2 dbb278b0-b589-44…      935.        52.8             5           0   
#>  3        3 f0115426-e6f8-4c…     1655.        51.2             5           5   
#>  4        4 337d84a7-3bff-48…     1571.        47.5             0           0   
#>  5        5 998f098a-8584-49…      907.        45.2             0           0   
#>  6        6 aae330db-8f22-4d…     1271.        52.9             3.78        5   
#>  7        7 76e0f3e1-8e17-49…     2662.        48.4             1.51        2.23
#>  8        8 24de994f-e06a-41…     2039.        69.0             2.76        5   
#>  9        9 8f61ae64-6a82-4f…     1469.        70.9             5           5   
#> 10       10 b47ab1b8-e62b-4b…     1636.        61.2             2.64        0   
#> # ℹ 11 more rows
#> # ℹ 11 more variables: HEI2015_VEG <dbl>, HEI2015_GREENNBEAN <dbl>,
#> #   HEI2015_TOTALPRO <dbl>, HEI2015_SEAPLANTPRO <dbl>,
#> #   HEI2015_WHOLEGRAIN <dbl>, HEI2015_DAIRY <dbl>, HEI2015_FATTYACID <dbl>,
#> #   HEI2015_REFINEDGRAIN <dbl>, HEI2015_SODIUM <dbl>, HEI2015_ADDEDSUGAR <dbl>,
#> #   HEI2015_SATFAT <dbl>