Skip to contents

Calculate the Dietary Inflammatory Index for the ASA24 data within 1 step

Usage

DII_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

Whether to summarize the food group and nutrient intake over all days reported per individual per day. Default is TRUE.

Value

The DII and its component scores

Examples

data("ASA24_exp")
DII_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 × 32
#> # Groups:   UserName [21]
#>    UserName UserID DII_ALL DII_NOETOH ALCOHOL   VITB12  VITB6 BCAROTENE CAFFEINE
#>       <dbl> <chr>    <dbl>      <dbl>   <dbl>    <dbl>  <dbl>     <dbl>    <dbl>
#>  1        1 e6541…   0.221    -0.0574   0.278 -0.0766   0.127    -0.408   0.0848
#>  2        2 dbb27…   3.23      2.95     0.278 -0.0982   0.136     0.295   0.0845
#>  3        3 f0115…   1.80      1.52     0.278 -0.0185  -0.214     0.549   0.0850
#>  4        4 337d8…   1.46      1.18     0.278  0.00997 -0.185     0.538   0.0850
#>  5        5 998f0…   4.10      3.82     0.274 -0.0934   0.239     0.565   0.0844
#>  6        6 aae33…   2.59      2.31     0.278 -0.0846  -0.359     0.554   0.0846
#>  7        7 76e0f…   1.40      1.12     0.278 -0.0781  -0.206    -0.125   0.0839
#>  8        8 24de9…   0.512     0.742   -0.231 -0.0608  -0.252     0.459   0.0850
#>  9        9 8f61a…   1.23      0.952    0.278 -0.0908   0.134     0.564   0.0847
#> 10       10 b47ab…   2.33      2.05     0.278 -0.0949   0.184     0.537   0.0845
#> # ℹ 11 more rows
#> # ℹ 23 more variables: CARB <dbl>, CHOLES <dbl>, KCAL <dbl>, TOTALFAT <dbl>,
#> #   FIBER <dbl>, FOLICACID <dbl>, IRON <dbl>, MG <dbl>, MUFA <dbl>,
#> #   NIACIN <dbl>, N3FAT <dbl>, N6FAT <dbl>, PROTEIN <dbl>, PUFA <dbl>,
#> #   RIBOFLAVIN <dbl>, SATFAT <dbl>, SE <dbl>, THIAMIN <dbl>, VITA <dbl>,
#> #   VITC <dbl>, VITD <dbl>, VITE <dbl>, ZN <dbl>