HEI2020_NHANES_FPED
HEI2020_NHANES_FPED.Rd
Calculate the HEI2020 for the NHANES_FPED data (after 2005) within 1 step for day 1, day 2, or day 1 and 2 combined, including HEI2020 and HEI-Toddlers-2020
Usage
HEI2020_NHANES_FPED(
FPED_PATH = NULL,
NUTRIENT_PATH = NULL,
DEMO_PATH,
FPED_PATH2 = NULL,
NUTRIENT_PATH2 = NULL
)
Arguments
- FPED_PATH
The file path for the FPED data. The file name should be like: fped_dr1tot_1112.sas7bdat
- NUTRIENT_PATH
The file path for the NUTRIENT data. The file name should be like: DR1TOT_J.XPT
- DEMO_PATH
The file path for the DEMOGRAPHIC data. The file name should be like: DEMO_J.XPT
- FPED_PATH2
The file path for the FPED2 data. The file name should be like: fped_DR2tot_1112.sas7bdat
- NUTRIENT_PATH2
The file path for the NUTRIENT2 data. The file name should be like: DR2TOT_J.XPT
Examples
data("NHANES_20172018")
HEI2020_NHANES_FPED(FPED_PATH = NHANES_20172018$FPED, NUTRIENT_PATH = NHANES_20172018$NUTRIENT, DEMO_PATH = NHANES_20172018$DEMO, FPED_PATH2 = NHANES_20172018$FPED2, NUTRIENT_PATH2 = NHANES_20172018$NUTRIENT2)
#> # A tibble: 6,318 × 16
#> SEQN RIDAGEYR HEI2020_ALL HEI2020_TOTALFRT HEI2020_FRT HEI2020_VEG
#> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
#> 1 93704 2 61.7 5 2.5 1.55
#> 2 93705 66 43.0 0.0759 0 3.46
#> 3 93707 13 38.9 0 0 2.09
#> 4 93708 66 49.9 1.22 2.45 3.20
#> 5 93711 56 69.0 3.57 2.85 3.75
#> 6 93712 18 46.4 2.5 2.5 2.42
#> 7 93713 67 55.4 4.84 5 3.47
#> 8 93714 54 36.1 0.321 0.617 1.85
#> 9 93715 71 30.7 0.777 1.55 0.614
#> 10 93716 61 65.0 5 5 4.03
#> # ℹ 6,308 more rows
#> # ℹ 10 more variables: 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>