Skip to contents

Calculate the HEI2020 for the ASA24 data within 1 step

Usage

HEI2020_ASA24(DATA_PATH, RECALL_SUMMARIZE = TRUE)

Arguments

DATA_PATH

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

Value

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

Examples

data("ASA24_exp")
HEI2020_ASA24(ASA24_exp, RECALL_SUMMARIZE = TRUE)
#> [1] "RECALL_SUMMARIZE = TRUE, summarizing HEI2020 for ASA24 data by averaging over all possible recalls per person per day..."
#> [1] "The results should be only used for HEI-2020 (non-toddlers, age > 2 years), not including HEI-Toddlers 2020 (age 1-2 years)."
#> # A tibble: 21 × 17
#> # Groups:   UserName, UserID [21]
#>    UserName UserID            TOTALKCAL HEI2020_ALL HEI2020_TOTALFRT HEI2020_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: HEI2020_VEG <dbl>, HEI2020_GREENNBEAN <dbl>,
#> #   HEI2020_TOTALPRO <dbl>, HEI2020_SEAPLANTPRO <dbl>,
#> #   HEI2020_WHOLEGRAIN <dbl>, HEI2020_DAIRY <dbl>, HEI2020_FATTYACID <dbl>,
#> #   HEI2020_REFINEDGRAIN <dbl>, HEI2020_SODIUM <dbl>, HEI2020_ADDEDSUGAR <dbl>,
#> #   HEI2020_SATFAT <dbl>