Skip to contents

Calculate the HEI2020_TODDLERS for the ASA24 data within 1 step

Usage

HEI2020_TODDLERS_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_TODDLERS and its component scores for each individual per day.

Examples

data("ASA24_exp")
HEI2020_TODDLERS_ASA24(ASA24_exp, RECALL_SUMMARIZE = TRUE)
#> [1] "RECALL_SUMMARIZE = TRUE, summarizing HEI2020_TODDLERS for ASA24 data by averaging over all possible recalls per person per day..."
#> [1] "The results should be only used for HEI-Toddlers 2020 (age 1-2 years), not for HEI-2020 (non-toddlers, age > 2 years)."
#> # A tibble: 21 × 17
#> # Groups:   UserName, UserID [21]
#>    UserName UserID         TOTALKCAL HEI2020_TODDLERS_ALL HEI2020_TODDLERS_TOT…¹
#>       <dbl> <chr>              <dbl>                <dbl>                  <dbl>
#>  1        1 e6541891-8a22…     1514.                 60.8                   1.44
#>  2        2 dbb278b0-b589…      935.                 55.2                   5   
#>  3        3 f0115426-e6f8…     1655.                 47.8                   5   
#>  4        4 337d84a7-3bff…     1571.                 50.7                   0   
#>  5        5 998f098a-8584…      907.                 39.3                   0   
#>  6        6 aae330db-8f22…     1271.                 46.9                   4.32
#>  7        7 76e0f3e1-8e17…     2662.                 45.4                   1.73
#>  8        8 24de994f-e06a…     2039.                 70.3                   3.16
#>  9        9 8f61ae64-6a82…     1469.                 69.1                   5   
#> 10       10 b47ab1b8-e62b…     1636.                 59.2                   3.01
#> # ℹ 11 more rows
#> # ℹ abbreviated name: ¹​HEI2020_TODDLERS_TOTALFRT
#> # ℹ 12 more variables: HEI2020_TODDLERS_FRT <dbl>, HEI2020_TODDLERS_VEG <dbl>,
#> #   HEI2020_TODDLERS_GREENNBEAN <dbl>, HEI2020_TODDLERS_TOTALPRO <dbl>,
#> #   HEI2020_TODDLERS_SEAPLANTPRO <dbl>, HEI2020_TODDLERS_WHOLEGRAIN <dbl>,
#> #   HEI2020_TODDLERS_DAIRY <dbl>, HEI2020_TODDLERS_FATTYACID <dbl>,
#> #   HEI2020_TODDLERS_REFINEDGRAIN <dbl>, HEI2020_TODDLERS_SODIUM <dbl>, …